Problem with - Ban Command
#1

Hello.

I have got a problem with - Ban Command.

Error:

PHP код:
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(208) : error 029invalid expressionassumed zero
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
1 Error

Line 208:
PHP код:
    else 
All command:

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(-1poruka);
        
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;

Thank you very much!
Reply


Messages In This Thread
Problem with - Ban Command - by NoDi522 - 06.03.2015, 12:03
Re: Problem with - Ban Command - by CalvinC - 06.03.2015, 12:16
Re : Problem with - Ban Command - by Golimad - 06.03.2015, 12:18
Re: Problem with - Ban Command - by NoDi522 - 06.03.2015, 12:22

Forum Jump:


Users browsing this thread: 1 Guest(s)