07.10.2010, 01:14
(
Последний раз редактировалось [L3th4l]; 07.10.2010 в 01:43.
)
Simple question, when i put a player in a mini-game, how can i disable all cmds, but just enable 1 or 2?
public OnPlayerCommandText(playerid, cmdtext[])
{
if(InMinigame[playerid] == 1)
{
if(!strcmp(cmdtext,"/shop")true)//allow this command
{
//do somethnig
return 1;
}
return 0;//or you could send a message saying command not available in minigames
}
return 0;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(InMinigame[playerid] == 1)return 0;//or you could send a message saying command not available in minigames
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return 0;
}