Set commands
#5

I REALLY SUGGEST USING SSCANF2 + ZCMD! AND YES I"M WRITING IN CAPS SO U CAN UNDERSTAND HOW EASY IS TO SCRIPT LIKE THIS

pawn Код:
CMD:sethealth(playerid, params[])
{
    new ToID, Health;
    if(sscanf(params, "ui", ToID, Health)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /SetHealth < PlayerID > < Amount >");
    if(!IsPlayerConnected(ToID)) return SendClientMessage(playerid, COLOR_RED, "That user is not connected!");
    SetPlayerHealth(ToID, Health);
    return 1;
}
pawn Код:
CMD:throw(playerid, params[])
{
    new ToID;
    if(sscanf(params, "u", ToID)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /Throw < PlayerID >");
    if(!IsPlayerConnected(ToID)) return SendClientMessage(playerid, COLOR_RED, "That user is not connected!");
    SetPlayerPos(ToID, 419.800018, 2531.705322, 16.157726);
    SendClientMessage(ToID, 0xFF8000FF, "You have been teleported away because you were stalking!");
    return 1;
}
See how easy it is to script that way?
Reply


Messages In This Thread
Set commands - by knackworst - 31.10.2010, 20:14
Re: Set commands - by dark_clown - 31.10.2010, 20:32
Re: Set commands - by knackworst - 31.10.2010, 21:02
Re: Set commands - by Freddi-25 - 31.10.2010, 21:38
Re: Set commands - by [L3th4l] - 31.10.2010, 21:43
Re: Set commands - by knackworst - 31.10.2010, 21:43
Re: Set commands - by Mike_Peterson - 31.10.2010, 21:51

Forum Jump:


Users browsing this thread: 1 Guest(s)