Posts: 162
Threads: 47
Joined: Aug 2008
Reputation:
0
Hello. Can someone tell me how to make a command that have 2 functions? I need command /vg. When you type /vg you turn on or off vehicle god can you tell me how do you make it? So like when you type /vg first time you turn on, second time you turn off etc.
Posts: 187
Threads: 41
Joined: Jul 2010
Reputation:
0
new VehicleGod[MAX_PLAYERS]; // on top of gamemode
if(strcmp(cmdtext, "/test", true)==0) // in onplayercommand
{
if(VehicleGod[playerid] == 0)
{
VehicleGod[playerid] = 1;
// Here you fuction set vehicle god on
}
else
{
VehicleGod[playerid] = 0;
// Here you fuction (set vehicle god off)
}
}