28.08.2014, 19:11
Help all my cmds in my server are buged help here how i use sscanf
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
// 2 LAST CMDS
if (strcmp("/restart", cmdtext, true, 10) == 0)
{
if(Player[playerid][pAdmin] >= 1)
{
SendClientMessageToAll(COLOR_YELLOW,"[SERVER]:Server is restarting be patient do not quit please");
GameTextForAll("~G~Server Restarting", 9000, 1);
SendRconCommand("gmx");
}
else
{
SendClientMessage(playerid, COLOR_RED, "[SERVER]:You are not allowed to use this command");
}
return 1;
}
if (strcmp("/desertairport", cmdtext, true, 10) == 0)
{
if(Player[playerid][pAdmin] >= 1)
{
SetPlayerPos(playerid,392.2665,2535.1682,16.5429);
SendClientMessage(playerid,COLOR_YELLOW,"[SERVER]:You teleported to Desert Airport");
}
else
{
SendClientMessage(playerid, COLOR_RED , "[SERVER]:You are not allowed to use this command");
}
return 1;
}
return 0;
}
// Is problem at end ??? Also i have no errors
//Ingame when i try to use a cmd it says unknown cmd.