2. So like that i create RegisterHam(Ham_TakeDamage, "player", "OnPlayerEvent_Damage2"); & RegisterHam(Ham_TakeDamage, "player", "OnPlayerEvent_Damage3"); // ?
4.how to reset all models everyting on new round to default?
// First bool for first weapon new bool:g_Weapon1[33]
// First bool for second weapon new bool:g_Weapon2[33]
// First bool for third weapon new bool:g_Weapon3[33]
public OnPlayerEvent_Damage(victim, inflictor, attacker, Float:damage, damagebits) { if(!is_user_alive(attacker)) return
// For first weapon if(g_Weapon1[id]) { // This will increase the weapon damage by 2 times SetHamParamFloat(4,damage*2.0) } // For second weapon else if(g_Weapon2[id]) { // This will increase the weapon damage by 3 times SetHamParamFloat(4,damage*3.0) } // For third weapon else if(g_Weapon3[id]) { // This will increase the weapon damage by 4 times SetHamParamFloat(4,damage*4.0) } }
Personal message only for paid request. If you love this forum, kindly to donate by clicking the donate button at the footer of this forum.
Welcome to the AMX Mod X 1.8.1-300 Compiler. Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team
Error: Undefined symbol "id" on line 266 Error: Undefined symbol "client" on line 272 Error: Undefined symbol "client" on line 278 Error: Must be a constant expression; assumed zero on line 289 Error: Must be a constant expression; assumed zero on line 290 Error: Must be a constant expression; assumed zero on line 291 Error: Must be a constant expression; assumed zero on line 292 Error: Must be a constant expression; assumed zero on line 293 Error: Must be a constant expression; assumed zero on line 294 Error: Must be a constant expression; assumed zero on line 295 Error: Must be a constant expression; assumed zero on line 296 Error: Must be a constant expression; assumed zero on line 297 Warning: Symbol is assigned a value that is never used: "g_flash" on line 300 Warning: Symbol is assigned a value that is never used: "g_invisibility" on line 300 Warning: Symbol is assigned a value that is never used: "g_godmode" on line 300 Warning: Symbol is assigned a value that is never used: "g_armor" on line 300 Warning: Symbol is assigned a value that is never used: "g_multijump" on line 300 Warning: Symbol is assigned a value that is never used: "g_gravity" on line 300 Warning: Symbol is assigned a value that is never used: "g_Weapon3" on line 300 Warning: Symbol is assigned a value that is never used: "g_Weapon2" on line 300 Warning: Symbol is assigned a value that is never used: "g_Weapon1" on line 300 Error: Undefined symbol "NORMAL" on line 305 Warning: Expression has no effect on line 305 Error: Expected token: ";", but found ")" on line 305 Error: Invalid expression, assumed zero on line 305 Error: Too many error messages on one line on line 305
Compilation aborted. 16 Errors. Could not locate output file C:\Users\Downloads\Video\nm_shopmenu.amx (compile failed).
new bool:g_Weapon1[33] new bool:g_Weapon2[33] new bool:g_Weapon3[33] new bool:g_gravity[33] new bool:g_multijump[33] new bool:g_armor[33] new bool:g_godmode[33] new bool:g_invisibility[33] new bool:g_flash[33]
new const silver_knife[] = "models/shop/v_silver.mdl"
new const gold_knife[] = "models/shop/v_gold.mdl"
new const hammer_knife[] = "models/shop/v_hammer.mdl"
public plugin_precache() { precache_model(silver_knife); precache_model(gold_knife); precache_model(hammer_knife); }
public plugin_cfg(){ g_hMenu = menu_create("SHOP Menu","mHandler");
menu_additem(g_hMenu,"\wBuy Gravity \r(Low Gravity) \y(Price:500$)"); menu_additem(g_hMenu,"\wBuy Multijump \r(MultiJump for 2Min) \y(Price:2000$)"); menu_additem(g_hMenu,"\wBuy Armour \r(50 Ap) \y(Price:500$)"); menu_additem(g_hMenu,"\wBuy Silver knife \r(Knife & Model with +20hp Damage) \y(Price:2000$)"); menu_additem(g_hMenu,"\wBuy gold knife \r(Knife & Model with +30hp Damage) \y(Price:3000$)"); menu_additem(g_hMenu,"\wBuy hammer \r(Hammer with +50hp damage) \y(Price:4000$)"); menu_additem(g_hMenu,"\wBuy Flash Bangs \r(Get 2 Flash Bangs.) \y(Price:1000$)"); menu_additem(g_hMenu,"\wBuy GOD MOD \r(God Mode For 1Min) \y(Price:15000$)"); menu_additem(g_hMenu,"\wBuy Invisibility \r(Go Invisible For 45Sec) \y(Price:5000$)"); }
public cmdshopmenu(client) {
if (is_user_alive( client )) { menu_display(client,g_hMenu);
menu_setprop( g_hMenu, MPROP_EXIT, MEXIT_ALL );
return PLUGIN_HANDLED;
} return PLUGIN_HANDLED; }
public mHandler(client,menu,item) { if (!is_user_alive(client) && !get_pcvar_num(pEnabled)) return PLUGIN_HANDLED;
switch(item) {
case 0: { if(cs_get_user_money(client) > 500) { set_user_gravity(client, 0.5); cs_set_user_money(client, cs_get_user_money(client) - 500); client_print(client, print_chat, "[NM] You Have Got Low Gravity!"); g_gravity[client] = true }
else { client_print(client, print_chat, "[NM] You Dont Have Enough Of Funds!"); }
}
case 1: { if(cs_get_user_money(client) > 2000) { cs_jump_reward(client, 1, 3, 1, 120.0); cs_set_user_money(client, cs_get_user_money(client) - 2000); client_print(client, print_chat, "[NM] You Have Got MultiJump,Use it carefully. You have 3 Chance!"); g_multijump[client] = true }
else { client_print(client, print_chat, "[NM] You Dont Have Enough Of Funds!"); } }
case 2: { if(cs_get_user_money(client) > 500) { set_user_armor(client, get_user_armor(client) + 50); cs_set_user_money(client, cs_get_user_money(client) - 500); client_print(client, print_chat, "[NM] You Have Got 50AP!"); g_armor[client] = true }
else { client_print(client, print_chat, "[NM] You Dont Have Enough Of Funds!"); }
}
case 3: { if(cs_get_user_money(client) > 2000) { cs_set_user_model(client, silver_knife); cs_set_user_money(client, cs_get_user_money(client) - 2000); client_print(client, print_chat, "[NM] You Have Got Silver Knife!"); //extra damage +20 damage g_Weapon1[client] = true
}
else { client_print(client, print_chat, "[NM] You Dont Have Enough Of Funds!"); } }
case 4: { if(cs_get_user_money(client) > 3000) { cs_set_user_model(client, gold_knife); cs_set_user_money(client, cs_get_user_money(client) - 3000); client_print(client, print_chat, "[NM] You Have Got Gold Knife!"); //extra damage +30 dmage g_Weapon2[client] = true
}
else { client_print(client, print_chat, "[NM] You Dont Have Enough Of Funds!"); } }
case 5: { if(cs_get_user_money(client) > 5000) { cs_set_user_model(client, hammer_knife); cs_set_user_money(client, cs_get_user_money(client) - 5000); client_print(client, print_chat, "[NM] You Have Hammer!"); //extra damage +50 g_Weapon3[client] = true
} else { client_print(client, print_chat, "[NM] You Dont Have Enough Of Funds!"); } } case 6: { if(cs_get_user_money(client) > 1000) { give_item(client, "weapon_flashbang"); cs_set_user_bpammo(client, CSW_FLASHBANG, 2) cs_set_user_money(client, cs_get_user_money(client) - 1000); client_print(client, print_chat, "[NM] You Got 2 FlashBangs!"); g_flash[client] = true } else { client_print(client, print_chat, "[NM] You Dont Have Enough Of Funds!"); } }
case 7: { if(cs_get_user_money(client) > 16000) { cs_godmode_reward(client, 1, 1, 60.0); cs_set_user_money(client, cs_get_user_money(client) - 15000); client_print(client, print_chat, "[NM] You Got GodMode!") g_godmode[client] = true } else { client_print(client, print_chat, "[NM] You Dont Have Enough Of Funds!"); } } case 8: { if(cs_get_user_money(client) > 5000) { cs_invisible_reward(client, 1, 5, 1, 45.0); cs_set_user_money(client, cs_get_user_money(client) - 5000); client_print(client, print_chat, "[NM] You Are Now Invisible!"); g_invisibility[client] = true } else { client_print(client, print_chat, "[NM] You Dont Have Enough Of Funds!"); } }
} return PLUGIN_HANDLED;
}
public OnPlayerEvent_Damage(victim, inflictor, attacker, Float:damage, damagebits) { if(!is_user_alive(attacker)) return
// For first weapon if(g_Weapon1[id]) { // This will increase the weapon damage by 2 times SetHamParamFloat(4,damage*2.0) } // For second weapon else if(g_Weapon2[id]) { // This will increase the weapon damage by 3 times SetHamParamFloat(4,damage*3.0) } // For third weapon else if(g_Weapon3[id]) { // This will increase the weapon damage by 4 times SetHamParamFloat(4,damage*4.0) } }
public Player_Spawn(id) { if(is_user_alive(id)) { new bool:g_Weapon1[id] = false new bool:g_Weapon2[id] = false new bool:g_Weapon3[id] = false new bool:g_gravity[id] = false new bool:g_multijump[id] = false new bool:g_armor[id] = false new bool:g_godmode[id] = false new bool:g_invisibility[id] = false new bool:g_flash[id] = false remove_task(id)
} }
public Message() { ColorChat(0, NORMAL, "^3[ NM ] ^1Say ^4/Shop ^3to Open The Shop Menu"); set_task(90.0, "Message") ColorChat(0, NORMAL, "^3[ NM ] ^1This Server is using ^4Shop Menu ^1Made By ^4Gullu Bhai") set_task(200.0, "Message")