Senior Member
Join Date: Oct 2008
Location: Atlanta,Georgia
|
02-26-2009
, 17:17
Re: [L4D] give player weapon
|
#17
|
ok im getting some wird errors i dont know what they mean
Code:
/home/groups/sourcemod/upload_tmp/textGG1FKm.sp(75) : error 029: invalid expression, assumed zero
/home/groups/sourcemod/upload_tmp/textGG1FKm.sp(75) : warning 215: expression has no effect
/home/groups/sourcemod/upload_tmp/textGG1FKm.sp(75) : error 001: expected token: ";", but found "if"
/home/groups/sourcemod/upload_tmp/textGG1FKm.sp(80) : error 029: invalid expression, assumed zero
/home/groups/sourcemod/upload_tmp/textGG1FKm.sp(80) : warning 215: expression has no effect
/home/groups/sourcemod/upload_tmp/textGG1FKm.sp(80) : error 001: expected token: ";", but found "if"
/home/groups/sourcemod/upload_tmp/textGG1FKm.sp(85) : error 029: invalid expression, assumed zero
/home/groups/sourcemod/upload_tmp/textGG1FKm.sp(85) : warning 215: expression has no effect
/home/groups/sourcemod/upload_tmp/textGG1FKm.sp(85) : error 001: expected token: ";", but found "if"
/home/groups/sourcemod/upload_tmp/textGG1FKm.sp(90) : error 029: invalid expression, assumed zero
/home/groups/sourcemod/upload_tmp/textGG1FKm.sp(90) : warning 215: expression has no effect
/home/groups/sourcemod/upload_tmp/textGG1FKm.sp(90) : error 001: expected token: ";", but found "if"
/home/groups/sourcemod/upload_tmp/textGG1FKm.sp(95) : error 029: invalid expression, assumed zero
/home/groups/sourcemod/upload_tmp/textGG1FKm.sp(95) : warning 215: expression has no effect
/home/groups/sourcemod/upload_tmp/textGG1FKm.sp(95) : error 001: expected token: ";", but found "if"
/home/groups/sourcemod/upload_tmp/textGG1FKm.sp(100) : error 029: invalid expression, assumed zero
/home/groups/sourcemod/upload_tmp/textGG1FKm.sp(100) : warning 215: expression has no effect
/home/groups/sourcemod/upload_tmp/textGG1FKm.sp(100) : error 001: expected token: ";", but found "if"
/home/groups/sourcemod/upload_tmp/textGG1FKm.sp(105) : error 029: invalid expression, assumed zero
/home/groups/sourcemod/upload_tmp/textGG1FKm.sp(105) : warning 215: expression has no effect
/home/groups/sourcemod/upload_tmp/textGG1FKm.sp(105) : error 001: expected token: ";", but found "if"
/home/groups/sourcemod/upload_tmp/textGG1FKm.sp(112) : error 030: compound statement not closed at the end of file (started at line 106)
15 Errors.
PHP Code:
/***************GUNS*************** ] give ammo - not included ] give autoshotgun ] give first_aid_kit - not included ] give health - not included ] give pipe_bomb ] give molotov ] give rifle ] give smg ] give hunting_rifle ] give pain_pills ] give pistol ] give pumpshotgun ************END LIST***************/ /**********Thanks To************** * CrimsonGt - helped me with give player item issues *********************************/ #pragma semicolon 1 #include <sourcemod> #define PLUGIN_VERSION "1.0.0" public Plugin:myinfo = { name = "[L4D] Tank Buster Wepons Menu", author = "{7~11} TROLL", description = "Gives Clients Gun Menu Incase There Out Of Ammo", version = PLUGIN_VERSION, url = "www.711clan.net" } public OnPluginStart() { //tank buster weapons menu cvar RegConsoleCmd("tankbuster", TankBusterMenu); //plugin version CreateConVar("tank_buster_version", PLUGIN_VERSION, "Tank_Buster_Version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY); } public Action:TankBusterMenu(client,args) { TankBuster(client); } public Action:TankBuster(clientId) { new Handle:menu = CreateMenu(TankBusterMenuHandler); SetMenuTitle(menu, "Tank Buster Weapons Menu"); AddMenuItem(menu, "option1", "Shotgun"); AddMenuItem(menu, "option2", "SMG"); AddMenuItem(menu, "option3", "Rifle"); AddMenuItem(menu, "option4", "Hunting Rifle"); AddMenuItem(menu, "option5", "Auto Shotgun"); AddMenuItem(menu, "option6", "Pipe Bomb"); AddMenuItem(menu, "option7", "Molotov"); AddMenuItem(menu, "option8", "Dual Pistols"); SetMenuExitButton(menu, true); DisplayMenu(menu, clientId, MENU_TIME_FOREVER); return Plugin_Handled; } public TankBusterMenuHandler(Handle:menu, MenuAction:action, client, itemNum) { //Strip the CHEAT flag off of the "give" command new flags = GetCommandFlags("give"); SetCommandFlags("give", flags & ~FCVAR_CHEAT); if ( action == MenuAction_Select ) { new String:info[32]; if (strcmp(info,"option1") == 0 ) { { //Give the player a rifle FakeClientCommand(client, "give rifle"); } else if ( strcmp(info,"option2") == 0 ) { { //Give the player a smg FakeClientCommand(client, "give smg"); } else if ( strcmp(info,"option3") == 0 ) { { //Give the player a rifle FakeClientCommand(client, "give rifle"); } else if ( strcmp(info,"option4") == 0 ) { { //Give the player a rifle FakeClientCommand(client, "give hunting_rifle"); } else if ( strcmp(info,"option5") == 0 ) { { //Give the player a rifle FakeClientCommand(client, "give autoshotgun"); } else if ( strcmp(info,"option6") == 0 ) { { //Give the player a rifle FakeClientCommand(client, "give pipe_bomb"); } else if ( strcmp(info,"option7") == 0 ) { { //Give the player a rifle FakeClientCommand(client, "give molotov"); } else if ( strcmp(info,"option8") == 0 ) { { //Give the player a rifle FakeClientCommand(client, "give pistol"); } //Add the CHEAT flag back to "give" command SetCommandFlags("give", flags|FCVAR_CHEAT);
__________________
|
|