22.06.2015, 03:06
Script
error/warning
Код:
ocmd:slap(playerid,params[]) { if(!IsPlayerAnAdmin(playerid,2))return SendClientMessage(playerid,COLOR_BLUE,"You're not allowed to use this command"); new string[128], string2[128]; format(string,sizeof(string),"You've slapped %s", PlayerName);//Line 589 format(string2,sizeof(string2),"You've been slapped by Adminstrator"); for(new i=0;i<GetMaxPlayers();i++) { if(IsPlayerConnected(i)) { if(IsPlayerAnAdmin(i,1)) { format(string2,sizeof(string2),"A: %s [LEVEL %i] used the SLAP command.",PlayerName(playerid),GetPVarInt(playerid,"Admin")); SendClientMessage(i,COLOR_ORANGE,string2); } } } new Float:x, Float:y, Float:z; GetPlayerPos(playerid,x,y,z); SetPlayerPos(playerid,x,y,z+10); return 1; }
Код:
(589) : error 076: syntax error in the expression, or invalid function call (872) : warning 209: function "IsPlayerAnAdmin" should return a value