28.06.2013, 20:01
Hello at
i have this error: invalid expression assumed zero. How to fix it?
Код:
else {
Код:
CMD:spec(playerid, params[]) { if(pInfo[playerid][pLogged] == 1) { if(pInfo[playerid][pAdminLevel] >= 1) { if(team[playerid] == TEAM_ADUTY) { if(!strlen(params)) return SendClientMessage(playerid,-1,""chat""COL_LGREEN" /spec [id]"); new giveid=strval(params); if(!IsPlayerConnected(giveid) || giveid==playerid)return SendClientMessage(playerid,-1,""chat""COL_RED" Invalid ID"); TogglePlayerSpectating(playerid,1); switch(GetPlayerState(giveid)) { case 2,3:PlayerSpectateVehicle(playerid,GetPlayerVehicleID(giveid)); case 0,1,7,8,4:PlayerSpectatePlayer(playerid,giveid); case 9:return SendClientMessage(playerid,-1,""chat""COL_RED" You cant spec this player"); } new MyString[128]; format(MyString,sizeof MyString, "{FFFFFF}» {FFFF00}You are now spectating %s! Type /specoff to stop", PlayerName(giveid)); SendClientMessage(playerid, -1, MyString); SetPVarInt(playerid,"spect",giveid); SetPVarInt(giveid,"spec",playerid); } } else { SendClientMessage(playerid,-1,""chat""COL_WHITE" SERVER: Unknown command."); } } else { SendClientMessage(playerid,-1,""chat" You are not logged in!"); Kick(playerid); } else { SendClientMessage(playerid,-1,""chat""COL_RED" You must be on duty to use this command."); Kick(playerid); } return 1; }