29.05.2014, 04:06
Hopefully this helps you out.
Код:
new TPon;
public OnGameModeInit
{
TPon = 0;
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/enabletps",cmdtext,true)==0)
{
if(IsPlayerAdmin(playerid))
{
if(TPon = 0)
{
TPon = 1;
//etc the rest of your code here that notifys admins
}
else if(TPon = 1)
{
TPon = 0;
SendClientMessageToAll(playerid, -1, "An Admin has Just Turned The Notes Off");
}
}
else return SendClientMessage(playerid, -1, "You are not admin, therfore you cannot use this command");
return 1;
}
return 0;
}

