SA-MP Forums Archive
Just a simple example :) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Just a simple example :) (/showthread.php?tid=252153)



Just a simple example :) - [JnA]DukeNukem - 30.04.2011

How can I make a simple command that kills the player of the id I put in? Something like, I type /kill 1, and player with id 1 gets killed.... example anyone??

Thanks!


Re: Just a simple example :) - StreetGT - 30.04.2011

ZCMD,DCMD or Strotck?

if you use ZCMD, there is:
pawn Код:
CMD:kill(playerid,params[])
{
    new id;
    if(sscanf(params, "u", id)) SendClientMessage(playerid,comandos,"USAGE: /kill [ID/NAME]");
    else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid,comandos, "Player not found");
    else
    {
        if(!IsPlayerAdmin(playerid)) return 1;
        SetPlayerHealth(id,0.0);
       SendClienMessage(playerid,green, "You have been teleported");
    }
    return 1;
}