Easy Question about /GiveWeapon
#9

This is one of the easiest commands to make, seriously.
pawn Код:
CMD:giveweapon(playerid,params[])
{
    if(!IsPlayerAdmin(playerid)) // If they are not RCON admin
    {
        // Then it sends this message
        SendClientMessage(playerid,-1,"You are not authorised to use this command.");
        return 1;
    }
    new
        weaponid,
        targetid,
        ammo;
       
    if(sscanf(params,"uii",targetid,weaponid,ammo))
    {
        // If they typed the command wrong then show them this
        SendClientMessage(playerid,-1,"USAGE: /giveweapon [playerid] [weaponid] [ammo]");
        return 1;
    }
    else
    {
        GivePlayerWeapon(targetid,weaponid,ammo);
        return 1;
    }
    return 1;
}
Reply


Messages In This Thread
Easy Question about /GiveWeapon - by Alexy_Dramon - 17.03.2012, 14:06
Re: Easy Question about /GiveWeapon - by Dan_Barocu - 17.03.2012, 14:10
Re: Easy Question about /GiveWeapon - by Faisal_khan - 17.03.2012, 14:11
Re: Easy Question about /GiveWeapon - by Alexy_Dramon - 17.03.2012, 14:11
Re: Easy Question about /GiveWeapon - by Dan_Barocu - 17.03.2012, 14:13
Re: Easy Question about /GiveWeapon - by Alexy_Dramon - 17.03.2012, 14:21
Re: Easy Question about /GiveWeapon - by Dan_Barocu - 17.03.2012, 14:24
Re: Easy Question about /GiveWeapon - by Alexy_Dramon - 17.03.2012, 14:29
Re: Easy Question about /GiveWeapon - by ReneG - 17.03.2012, 14:31
Re: Easy Question about /GiveWeapon - by Alexy_Dramon - 17.03.2012, 14:33

Forum Jump:


Users browsing this thread: 1 Guest(s)