What I wanted to do, after giving my first shot at pawn, was have a command that will give you a weapon if you enter in a certain number
e.g. amx_giveweapon <playername> 3 - you'll be given a magnum
I have compared this code to other people's code but I can't find the problem.
I wanted to use this code for Sven Coop
Code:
#include <amxmodx>
#include <fun>
#define PLUGIN "giveWeapon"
#define VERSION "1.0"
#define AUTHOR "KneeGrow"
public plugin_init(){
register_plugin(PLUGIN,VERSION,AUTHOR);
register_concmd("amx_giveweapon","giveWeapon",ADMIN_KICK,"<target> <weaponid> enter 0-4");
}
public giveWeapon(id,wid){
if(wid==0){
give_item(id,weapon_shotgun);
return PLUGIN_HANDLED;
} else if(wid==1){
give_item(id,weapon_9mmhandgun);
return PLUGIN_HANDLED;
} else if(wid==2){
give_item(id,weapon_mp5);
return PLUGIN_HANDLED;
} else if(wid==3){
give_item(id,weapon_357);
return PLUGIN_HANDLED;
} else if(wid==4){
give item(id,weapon_m249);
return PLUGIN_HANDLED;
} else {
console_print(id,"out of range, 0-4 only");
}
return PLUGIN_HANDLED;
}
After compiling, if this matters to you guys, because I can't decipher this
weapongiver.sma(14) : error 017: undefined symbol "weapon_shotgun"
weapongiver.sma(14) : error 088: number of arguments does not match definition
weapongiver.sma(17) : error 017: undefined symbol "weapon_9mmhandgun"
weapongiver.sma(17) : error 088: number of arguments does not match definition
weapongiver.sma(20) : error 017: undefined symbol "weapon_mp5"
weapongiver.sma(20) : error 088: number of arguments does not match definition
weapongiver.sma(23) : error 017: undefined symbol "weapon_357"
weapongiver.sma(23) : error 088: number of arguments does not match definition
weapongiver.sma(26) : error 017: undefined symbol "give"
weapongiver.sma(26) : error 088: number of arguments does not match definition