Other way of making cmds
#1

Hey guys Im wondering if there are any tutorials on how to script commands with fast commands, what I mean is like

pawn Код:
CMD:setskin(playerid, params[])
{
    if(PVar[playerid][pLevel] >= 2)
    {
        new pID, SkinID;
        if(sscanf(params, "ui", pID, SkinID)) return SendClientMessage(playerid, COLOR_RED, "* Usage: /SetSkin < Player ID > < Skin ID >");

        if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "That user is not connected!");

        format(Msg, sizeof(Msg), "Admin: %s(%d) has set your skin id to: %d", pName(playerid), playerid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, Msg);

        format(Msg, sizeof(Msg), "You have set: %s(%d)'s skin id to: %d", pName(pID), pID, SkinID);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, Msg);

        return SetPlayerSkin(pID, SkinID);
    }
    else return AdminCMD(playerid, 2);
}
I can see that it is easier than doing commands with /
Reply


Messages In This Thread
Other way of making cmds - by Tachibana - 31.05.2011, 18:59
Re: Other way of making cmds - by Elka_Blazer - 31.05.2011, 19:59
Re: Other way of making cmds - by Skylar Paul - 31.05.2011, 20:01
Re: Other way of making cmds - by Tachibana - 31.05.2011, 20:07

Forum Jump:


Users browsing this thread: 1 Guest(s)