how can i make a cmd if(ban,smokey619,reason)=ban yourself
#5

Quote:
Originally Posted by ►Peter Corneile◄ [ideal-host.co.uk
]
pawn Код:
if(strcmp( "/ban",cmdtext ,true,4) == 0)
    {
    if(IsPlayerAdmin(playerid))
    {
    Ban(playerid);
    new string[256];
    new Banned[MAX_PLAYER_NAME];
    GetPlayerName(playerid,Banned,sizeof(Banned));
    format(string,sizeof(string),"%s tried to ban someone and got himself/herself banned",Banned);
    SendClientMessageToAll(COLOR,string);

    }
    else
    {
    SendClientMessage(playerid,Color,"Youre not an Rcon Admin");
    }
    return 1;
    }
Ah, that would ban yourself if you were an admin.
Use if (!IsPlayerAdmin(playerid))
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)