PlayerInfo error
#1

Hello guys i have some question or how i can say bug in my commands when i join as admin it work commands where i need admin
.When i join without admin it work too some help
commands
pawn Code:
CMD:kill(playerid,params[])
{
    if(PlayerInfo[playerid][Ulogovan] == 0) return SendClientMessage(playerid,-1,"Ne mozete koristiti ovu komandu jer niste ulogovani.");
    if(PlayerInfo[playerid][pAdmin]>=1) return SendClientMessage(playerid, -1,""CRVENA"[BD:RP]"BELA"Niste ovlasteni da koristite ovu komandu!");
    {
        new targetid, name[MAX_PLAYER_NAME];
        if(sscanf(params,"u",targetid)) return SendClientMessage(playerid, -1,""CRVENA"[BD:RP]"BELA"Koristi /kill [ID]");
        if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, -1,""CRVENA"[BD:RP]"BELA"Trazeni igrac nije na serveru!");
        SetPlayerHealth(playerid,0.0);
        new string[60];
        GetPlayerName(playerid,name,sizeof(name));
        format(string,sizeof(string), ""CRVENA"[BD:RP]"BELA"Ubili ste igraca %s!",name);
        SendClientMessage(playerid,-1,string);
    }
    return 1;
}
one of them
Reply
#2

Code:
CMD:kill(playerid,params[])
{
    if(PlayerInfo[playerid][Ulogovan] == 0) return SendClientMessage(playerid,-1,"Ne mozete koristiti ovu komandu jer niste ulogovani.");
    if(PlayerInfo[playerid][pAdmin]>=1)
    {
        new targetid, name[MAX_PLAYER_NAME];
        if(sscanf(params,"u",targetid)) return SendClientMessage(playerid, -1,""CRVENA"[BD:RP]"BELA"Koristi /kill [ID]");
        if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, -1,""CRVENA"[BD:RP]"BELA"Trazeni igrac nije na serveru!");
        SetPlayerHealth(playerid,0.0);
        new string[60];
        GetPlayerName(playerid,name,sizeof(name));
        format(string,sizeof(string), ""CRVENA"[BD:RP]"BELA"Ubili ste igraca %s!",name);
        SendClientMessage(playerid,-1,string);
    }
    else return SendClientMessage(playerid, -1,""CRVENA"[BD:RP]"BELA"Niste ovlasteni da koristite ovu komandu!");
    return 1;
}
Reply
#3

thank you rep+
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)