/killplayer [id] help
#1

guys i have maked one command /killplayer [id] and its works ( first dcmd command )
but the client messages dont work... :/
when ill tupe just /killplayer i want to show me "USAGE: /killplayer [id]"
and thats not working please someone help me:

pawn Код:
dcmd_killplayer(playerid,params[])
{
    new target, TargetName[MAX_PLAYER_NAME];
    new id;
    new string[128];
    if(!sscanf(params, "u", target))
    {
        if(sscanf(params, "u", id)) SendClientMessage(playerid, RED, "USAGE: /killplayer [id]");
        else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, RED, "That player its not connected.");
        GetPlayerName(target, TargetName, sizeof(TargetName));
        format(string,sizeof(string),"You have killed player %s",TargetName);
        SendClientMessage(playerid,GREEN,string);
        SetPlayerHealth(target, 0.0);
        SendClientMessage(id, GREEN, "You has been killed by server admin.");
    }
    return 1;
}
Thanks
Reply


Messages In This Thread
/killplayer [id] help - by Rafa - 11.11.2010, 12:56
Re: /killplayer [id] help - by Hiddos - 11.11.2010, 13:00
Re: /killplayer [id] help - by TheHoodRat - 11.11.2010, 13:01

Forum Jump:


Users browsing this thread: 1 Guest(s)