01.04.2010, 11:13
Код:
if (strcmp("/spyspec", cmdtext, true, 10) == 0) { if (pInfo[playerid][pSpy] == 1) { if (pInfo[playerid][pSpec] == 1) { TogglePlayerSpectating(playerid, 0); pInfo[playerid][pSpec] = 0; } else { pInfo[playerid][pSpec] = 1; new idx; new tmp[30]; tmp = strtok(cmdtext, idx); new otherplayer = strval(tmp); if(IsPlayerConnected(otherplayer)) { TogglePlayerSpectating(playerid, 1); PlayerSpectatePlayer(playerid, otherplayer); //if you want you can copy this command and change Ban to Kick to kick a player } return 1;} } else { SendClientMessage(playerid, COLOR_RED, "** You need to be a spy to use that command"); } return 1; }
I can't work out why
