02.05.2017, 17:35
Quote:
Hi,
I was thinking about, is there any way how to disable all commands usage while I'm in (Example: Minigun DM) ? Or i have to do it on harder way! + REP tnx |
PHP код:
public OnPlayerCommandReceived(playerid, cmdtext[]) //this is in the zcmd include
{
if(!strcmp("/exitminigun", cmdtext, true, 9))
{
return 1;
}
if(inminigun[playerid] == true) //if the player is in the minigun event
{
SendClientMessage(playerid, COLOR_RED, "You must leave the the minigun in order to use commands");
return 0; //block all commands.
}
return 1; //allows a command, while return 0 blocks a command. cmdtext is the command text with /. "/slap" for example
}