|
Veteran Member
Join Date: Feb 2009
Location: Denmark
|

04-07-2009
, 12:33
Re: Errors.. Compile... Menu!!
|
#4
|
PHP Code:
#include <amxmodx>
#include <fun>
#include <fakemeta>
#define PLUGIN "ScoutKnifeZ_Manager"
#define VERSION "0.1"
#define AUTHOR "TitANious"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("ScoutKnifeZMenu", "cmdScoutKnifeZMenu")
}
public cmdScoutKnifeZMenu(id) {
new menu = menu_create ("\rMenu for ScoutKnifeZ_Manager!:", "handleScoutKnifeZMenu");
menu_additem(menu, "\wGravity800", "1", 0);
menu_additem(menu, "\wGravity600", "2", 1)
menu_additem(menu, "\wGravity400", "3", 1)
menu_additem(menu, "\wGravity200", "4", 1)
menu_additem(menu, "\wGravity100", "5", 1)
menu_additem(menu, "\wGiveSg550", "6", 1)
menu_additem(menu, "\wGiveAWP", "7", 1)
menu_additem(menu, "\wGiveG3sg1", "8", 1)
menu_display(id, menu, 0)
}
public handleScoutKnifeZMenu(id, menu, item)
{
if (item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new data[6], iName[64]
new access, callback
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback)
new key = str_to_num(data)
switch(key)
{
case 1:
{
set_user_gravity(id, 1)
client_print(id, print_chat, "You have 800 gravity, isnt that normal?")
menu_destroy(menu)
return PLUGIN_HANDLED
}
case 2:
{
set_user_gravity(id, 0.75)
client_print(id, print_chat, "600 gravity, a bit less than 800, nothing less?")
menu_destroy(menu)
return PLUGIN_HANDLED
}
case 3:
{
set_user_gravity(id, 0.5)
client_print(id, print_chat, "400, the half of normal!")
menu_destroy(menu)
return PLUGIN_HANDLED
}
case 4:
{
set_user_gravity(id, 0.125)
client_print(id, print_chat, "200, the half of 400, you jump high now")
menu_destroy(menu)
return PLUGIN_HANDLED
}
case 5:
{
set_user_gravity(id, 0.125)
client_print(id, print_chat, "100, the less in the whole server!")
menu_destroy(menu)
return PLUGIN_HANDLED
}
case 6:
{
client_cmd(id, "slot1; drop")
give_item( id, "weapon_sg550" );
give_item( id, "ammo_556nato" );
give_item( id, "ammo_556nato" );
give_item( id, "ammo_556nato" );
give_item( id, "ammo_556nato" );
give_item( id, "ammo_556nato" );
client_print(id, print_chat, "Didnt i deleted SG550?!")
menu_destroy(menu)
return PLUGIN_HANDLED
}
case 7:
{
client_cmd(id, "slot1; drop")
give_item(id, "weapon_g3sg1");
give_item(id, "ammo_762nato");
give_item(id, "ammo_762nato");
give_item(id, "ammo_762nato");
give_item(id, "ammo_762nato");
give_item(id, "ammo_762nato");
give_item(id, "ammo_762nato");
client_print(id, print_chat, "Did you really buy a G3SG1?!")
menu_destroy(menu)
return PLUGIN_HANDLED
}
case 8:
{
client_cmd(id, "slot1; drop")
give_item( id, "weapon_awp" );
give_item( id, "ammo_338magnum" );
give_item( id, "ammo_338magnum" );
give_item( id, "ammo_338magnum" );
give_item( id, "ammo_338magnum" );
give_item( id, "ammo_338magnum" );
client_print(id, print_chat, "Isnt a AWP forbidden?!")
menu_destroy(menu)
return PLUGIN_HANDLED
}
public respawn_player(id)
{
if(is_user_connected(id))
{
set_pev(id,pev_deadflag,DEAD_RESPAWNABLE);
set_pev(id, pev_iuser1, 0);
dllfunc(DLLFunc_Think,id)
engfunc(EngFunc_SetOrigin,id,Float:{-4800.0,-4800.0,-4800.0})
set_task(0.5,"spawnagain",id)
}
}
public spawnagain(id)
{
if(is_user_connected(id))
{
spawn(id)
dllfunc(DLLFunc_Spawn,id)
}
}
More errors/warnings
Code:
Welcome to the AMX Mod X 1.76-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team
Warning: Tag mismatch on line 44
Warning: Loose indentation on line 46
Warning: Loose indentation on line 53
Warning: Loose indentation on line 60
Warning: Loose indentation on line 67
Warning: Loose indentation on line 74
Warning: Loose indentation on line 87
Warning: Loose indentation on line 101
Warning: Loose indentation on line 114
Error: Only a single statement (or expression) can follow each "case" on line 118
Error: Undefined symbol "respawn_player" on line 118
Error: Invalid expression, assumed zero on line 132
Error: Undefined symbol "spawnagain" on line 132
Error: Expected token: "}", but found "-end of file-" on line 139
5 Errors.
Could not locate output file C:\Users\Jacob\Desktop\ScoutKnifeZ_Manager.amx (compile failed).
__________________
I dislike this.
"A sneeze never comes alone!" <-- Important to remember.
|
|