[Command Help] sscanff optional user + zcmd
#7

pawn Код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>

#define SCM SendClientMessage
#define COLOR_LIGHTRED 0xFF6347AA

CMD:nos(playerid, params[])
{
    new giveplayerid;
    if(sscanf(params, "u", giveplayerid)) return SCM(playerid, COLOR_LIGHTRED, "USAGE: /nos [playerid]");
    if(CheckARank(playerid, 4, 4))
    {
        if(playerid==giveplayerid)
        {
            if(IsPlayerInAnyVehicle(giveplayerid))
            {
                AddVehicleComponent(GetPlayerVehicleID(giveplayerid), 1010);
                SCM(playerid, COLOR_LIGHTRED, "[SERVER]: Succesfully installed Nitro x10!");
            }
            else
            {
                SCM(playerid, COLOR_LIGHTRED, "[SERVER]: FAILED!");
            }
        }
    }
    return 1;
}
You mean like that?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)