#1

How can i make /giveweapon cmd?
Reply
#2

pawn Код:
CMD:giveweapon(playerid, params[])
{
    new pID, wID, ammo;
    if(!sscanf(params, "uii", pID, wID, ammo))
    {
        if(wID > 0 && wID < 47)
        {
            GivePlayerWeapon(pID, wID, ammo);
        }
        else
        {
            SendClientMessage(playerid, COLOR, "Weapon ID out of range.");
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR, "USAGE: /giveweapon [PlayerID/name] [WeaponID] [Ammo]");
    }
    return 1;
}
Reply
#3

@Fama

Yours:
Код:
if(!sscanf(params, "uii", pID, wID, ammo)
the right one:

Код:
if(!sscanf(params, "uii", pID, wID, ammo))
U forgot a )
Reply
#4

True, my mistake.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)