/setadmin and /setvip etc.
#10

Valid ID? I type /makeadmin 0 1 (to test) and I get invalid ID, same with my kick command...

pawn Code:
CMD:kick(playerid,params[]){
    new id,reason[128];
    if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessage(playerid,COLOR_GRAY,"ERROR: You're not authorized to use this command!");
    else if(sscanf(params, "uz",id,reason)) return SendClientMessage(playerid,COLOR_GRAY,"SYNTAX: /kick [ID] [REASON]");
    else if(id==playerid)SendClientMessage(playerid,COLOR_WHITE,"Error: You can not kick yourself!");
    else if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid,COLOR_GRAY,"You can not kick an admin!");
    else if(id==INVALID_PLAYER_ID)SendClientMessage(playerid,COLOR_GRAY,"Error: Player not connected!");
    else{
    new name,string[128];
    format(string,sizeof(string),"%s has just kicked %s, Reason: %s",GetName(playerid),name);
    SendClientMessageToAll(COLOR_RED,string);
    Kick(playerid);
    }
    return 1;
}
It keeps saying "Player is not connected"
Reply


Messages In This Thread
/setadmin and /setvip etc. - by Azzeto - 30.09.2011, 23:56
Re: /setadmin and /setvip etc. - by GrimR - 01.10.2011, 00:13
Re: /setadmin and /setvip etc. - by Kingunit - 01.10.2011, 00:14
Re: /setadmin and /setvip etc. - by Azzeto - 01.10.2011, 00:38
Re: /setadmin and /setvip etc. - by grand.Theft.Otto - 01.10.2011, 02:07
Re: /setadmin and /setvip etc. - by Azzeto - 01.10.2011, 02:22
Re: /setadmin and /setvip etc. - by Pharrel - 01.10.2011, 02:25
Re: /setadmin and /setvip etc. - by Azzeto - 01.10.2011, 02:50
Re: /setadmin and /setvip etc. - by Pharrel - 01.10.2011, 02:54
Re: /setadmin and /setvip etc. - by Azzeto - 01.10.2011, 02:57
Re: /setadmin and /setvip etc. - by GrimR - 01.10.2011, 03:19
Re: /setadmin and /setvip etc. - by DRIFT_HUNTER - 01.10.2011, 03:46
Re: /setadmin and /setvip etc. - by Azzeto - 01.10.2011, 04:00

Forum Jump:


Users browsing this thread: 1 Guest(s)