Quote:
Originally Posted by Jefff
1. Disconnected player cant type commands
2.
pawn Код:
if(!strcmp(cmdtext, "/radio", true, 6))
3.
pawn Код:
if(!strcmp(cmdtext, "/radio", true, 6)) { if(!(GetPlayerSkin(playerid) == 61)) return SendClientMessage(playerid, -1, "You are not a pilot !"); if(!cmdtext[7]) return SendClientMessage(playerid, -1, "USAGE: /radio [text]"); #if !defined string new string[128]; #endif #if !defined pName new pName[MAX_PLAYER_NAME]; #endif
GetPlayerName(playerid, pName, MAX_PLAYER_NAME); format(string, sizeof(string), "[Pilot %s]: %s", pName, cmdtext[7]); for(new i,g=GetMaxPlayers(); i < g; i++) if(GetPlayerSkin(i) == 61) // this checks IsPlayerConnected too SendClientMessage(i, 0xFF000000, string); return 1; }
|
You wrong. This:
pawn Код:
if(!cmdtext[7])
return SendClientMessage(playerid, -1, "USAGE: /radio [text]");
must be:
pawn Код:
if(!cmdtext[6])
return SendClientMessage(playerid, -1, "USAGE: /radio [text]");