Command not working :P
#1

This command wont let me enter a ID, everytime i use it, it just kills me and dont let me enter a player id.. idk whats wrong help me plz

pawn Код:
CMD:akill(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] < 4) return SCM(playerid, COLOR_RED, "You are not authorized to use this command");
    new targetid, string[128], pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pname,sizeof(pname));
    if(sscanf(params, "u", targetid)) SendClientMessage(playerid, COLOR_FADE1, "USAGE:kill [playerid]");
    if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_RED, "invalid player id!");
    format(string, sizeof(string), "You have admin killed player %s ", pname);
    SendClientMessage(playerid, COLOR_YELLOW, string);
    SetPlayerHealth(targetid,0.0);
    return 1;
}
Reply


Messages In This Thread
Command not working :P - by San1 - 22.06.2013, 10:14
Re: Command not working :P - by Sulps - 22.06.2013, 10:20
Re: Command not working :P - by San1 - 22.06.2013, 10:23
Re: Command not working :P - by CaRa - 22.06.2013, 10:36
Re: Command not working :P - by Sulps - 22.06.2013, 10:36

Forum Jump:


Users browsing this thread: 1 Guest(s)