1. Make a new .gsc file and put this in it. Make sure to thread it and put it in your mod.csv!
2.Include the following file in your mod: ui_mp/scriptmenus/team_marinesopfor.menu
3.Open the file and search for "onopen" (without the "s).
4.above the line "if(IsInGame())" in the onOpen brackets add:
Make sure to include everything in your mod.csv and compile your mod.
If you used this give me, Pozzuh, credits.
Good luck!
Code:
#include maps\mp\_utility;
init()
{
level thread onPlayerConnect();
}
onPlayerConnect()
{
for(;;)
{
level waittill("connecting", player);
player thread onMenuResponse();
}
}
onMenuResponse()
{
self endon("disconnect");
for(;;)
{
self waittill("menuresponse", menu, response);
if(response=="button_b")
{
//add what the button should do here
continue;
}
if(response=="button_p")
{
//add what the button should do here
continue;
}
//add more buttons in the same way
}
}
3.Open the file and search for "onopen" (without the "s).
4.above the line "if(IsInGame())" in the onOpen brackets add:
Code:
execNow "bind2 b openscriptmenu z button_b; bind2 p openscriptmenu z button_p;";
//add more buttons in the same way
Make sure to include everything in your mod.csv and compile your mod.
If you used this give me, Pozzuh, credits.
Good luck!