06.03.2015, 12:03
Hello.
I have got a problem with - Ban Command.
Error:
Line 208:
All command:
Thank you very much!
I have got a problem with - Ban Command.
Error:
PHP код:
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(208) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
PHP код:
else
PHP код:
CMD:ban(playerid,params[])
{
new ID,razlog[128],poruka[128],poruka2[128],ime[MAX_PLAYER_NAME];
if(PlayerInfo[playerid][pAdministrator] < 2) return SendClientMessage(playerid,-1,"{F81414}Greska:{FFFFFF} Nemate dozvolu za tu komandu");
else if(sscanf(params,"us[128]",ID,razlog)) return SendClientMessage(playerid,-1,"{FFFFFF}Koristenje:{FFF1AF} /ban (ID/Ime) (Razlog)");
else if(ID == INVALID_PLAYER_ID) return SendClientMessage(playerid,-1,"{F81414}Greska: {FFFFFF}Igrac nije ulogiran na serveru");
else if(ID == playerid) return SendClientMessage(playerid,-1,"{F81414}Greska:{FFFFFF} Nemozete banovati samog sebe");
else if(PlayerInfo[ID][pAdministrator]) return SendClientMessage(playerid,-1,"{F81414}Greska:{FFFFFF} Nemozete banovati ostale administratore");
else
{
GetPlayerName(ID,ime,sizeof(ime));
format(poruka,sizeof(poruka),"{00C0FF}WG:{FFF1AF} %s{FFFFFF}[%d] je banovan sa servera od strane administratora. Razlog:{FFF1AF} %s",ime,ID,razlog);
SendClientMessageToAll(-1, poruka);
format(poruka2,sizeof(poruka2),"{00C0FF}WG: {FFFFFF}Banovali ste {FFF1AF}%s{FFFFFF}[%d] sa servera. Razlog:{FFF1AF} %s",ime,ID,razlog);
SendClientMessage(playerid,-1,poruka2);
PlayerInfo[ID][pBanovan] = 1;
Ban(ID);
}
else
{
PlayerInfo[ID][pBanovan] = 1;
}
return 1;
}