SA-MP Forums Archive
Give weapon help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Give weapon help (/showthread.php?tid=275705)



Give weapon help - Tanush123 - 10.08.2011

pawn Код:
CMD:givegun(playerid,params[])
{
    if(PlayerData[playerid][AdminLevel] > 2)
    {
        new Weapon;
        if(sscanf(params,"us",ID,Weapon)) return SendClientMessage(playerid,orange,"USAGE: /givegun [weapon name]");
        if(Weapon == Combat Shotgun)
        {
            format(str,sizeof(str),"%s has gave you a Combat Shotgun",Nam);
            SendClientMessage(ID,orange,str);
            GivePlayerWeapon(ID,27,99999);
        }
    }
    else return 0;
    return 1;
}
well i get
pawn Код:
D:\Users\Tanush\Desktop\SA-MP Server Stunt\gamemodes\stunt.pwn(3368) : error 017: undefined symbol "Combat"
D:\Users\Tanush\Desktop\SA-MP Server Stunt\gamemodes\stunt.pwn(3368) : error 017: undefined symbol "Shotgun"
D:\Users\Tanush\Desktop\SA-MP Server Stunt\gamemodes\stunt.pwn(3368) : error 029: invalid expression, assumed zero
D:\Users\Tanush\Desktop\SA-MP Server Stunt\gamemodes\stunt.pwn(3368) : fatal error 107: too many error messages on one line
I need to keep some guns in black list like minigun etc...


Re: Give weapon help - MadeMan - 10.08.2011

pawn Код:
if(Weapon == WEAPON_SHOTGSPA)