|
Junior Member
Join Date: Dec 2010
Location: Brazil
|

11-12-2011
, 18:54
[Help] Last Request plugin
|
#1
|
I've donwloaded a LR plugin and edited it, but now it doesn't work, the compilation don't get errors, here's the code:
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx> #include <amxmisc> #include <fun> #include <cstrike> #include <fakemeta_util> #include <hamsandwich>
#define PLUGIN "rL Duelo" #define VERSION "1.0" #define AUTHOR "almost"
new g_iMaxPlayers new bool: shot_deagle[33]
public plugin_init() { register_plugin("rL Duelo", "1.0", "almost"); register_event("HLTV", "event_round_start", "a", "1=0", "2=0"); register_clcmd("say /duelo", "duelo_menu"); register_clcmd("say !duelo", "duelo_menu"); RegisterHam( Ham_Weapon_PrimaryAttack, "weapon_deagle", "fw_primary_attack", 1 ); RegisterHam( Ham_Weapon_PrimaryAttack, "weapon_usp", "fw_primary_attack2", 2 ); RegisterHam( Ham_Weapon_PrimaryAttack, "weapon_glock18", "fw_primary_attack3", 1 ); RegisterHam( Ham_Weapon_PrimaryAttack, "weapon_awp", "fw_primary_attack4", 1 ); RegisterHam( Ham_Weapon_PrimaryAttack, "weapon_scout", "fw_primary_attack5", 1 ); RegisterHam( Ham_Weapon_PrimaryAttack, "weapon_m3", "fw_primary_attack6", 1 ); register_clcmd("say_team /duelo", "duelo_menu"); register_clcmd("say_team !duelo", "duelo_menu"); g_iMaxPlayers = get_maxplayers() }
public event_round_start() { for (new id; id <= g_iMaxPlayers; id++) { fm_set_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderNormal, 20) } }
public duelo_menu(id) { if (cs_get_user_team(id) != CS_TEAM_T || !is_user_alive(id)) { return PLUGIN_HANDLED; } new ctCount, trCount; for (new i = 1; i <= g_iMaxPlayers; i++) { if (!is_user_alive(i)) { continue; } switch (cs_get_user_team(i)) { case CS_TEAM_CT: { ctCount++; } case CS_TEAM_T: { trCount++; } } } if (trCount > 1) { return PLUGIN_HANDLED; } if (ctCount == 0) { return PLUGIN_HANDLED; } if(get_user_team(id) == 1 ) { new duelomenu = menu_create("\r[rL' JailBreak] \wEscolha Seu Duelo:", "sub_duelo_menu") menu_additem(duelomenu, "\wNormais", "1", 0); menu_additem(duelomenu, "\wTiro Por Tiro", "2", 0); menu_setprop(duelomenu, MPROP_EXIT, MEXIT_ALL); menu_display(id, duelomenu, 0); } return PLUGIN_HANDLED; }
public sub_duelo_menu(id, duelomenu, item) { if (item == MENU_EXIT) { menu_destroy(duelomenu); return PLUGIN_HANDLED; } new Data[6], Name[64]; new Access, Callback; menu_item_getinfo(duelomenu, item, Access, Data,5, Name, 63, Callback); new Key = str_to_num(Data); switch (Key) { case 1: { normais(id) } case 2: { s4s(id) } } menu_destroy(duelomenu); return PLUGIN_HANDLED; }
public normais(id) { new normaismenu = menu_create("\r[rL ' Jailbreak] \wEscolha o a arma que voce quer:", "subnormais"); menu_additem(normaismenu, "\wFACA", "1", 0); menu_additem(normaismenu, "\wGRANADA", "2", 0); menu_additem(normaismenu, "\wDEAGLE", "3", 0); menu_additem(normaismenu, "\wUSP", "5", 0); menu_additem(normaismenu, "\wGLOCK", "6", 0); menu_additem(normaismenu, "\wAWP", "7", 0); menu_additem(normaismenu, "\wSCOUT", "8", 0); menu_additem(normaismenu, "\wM3", "9", 0); menu_additem(normaismenu, "\wXM1014", "10", 0); menu_additem(normaismenu, "\wM4A1", "11", 0); menu_additem(normaismenu, "\wAK47", "12", 0); menu_additem(normaismenu, "\wRAMBO", "13", 0);
menu_setprop(normaismenu, MPROP_EXIT, MEXIT_ALL); menu_display(id, normaismenu, 0);
}
public subnormais(id, normaismenu, item) { if (item == MENU_EXIT) { menu_destroy(normaismenu); return PLUGIN_HANDLED; } new Data[6], Name[64]; new Access, Callback; menu_item_getinfo(normaismenu, item, Access, Data,5, Name, 63, Callback); new Key = str_to_num(Data); switch (Key) { case 1: { menu(id) } case 2: { menu2(id) } case 3: { menu3(id) } case 4: { menu4(id) } case 5: { menu5(id) } case 6: { menu6(id) } case 7: { menu7(id) } case 8: { menu8(id) } case 9: { menu9(id) } case 10: { menu10(id) } case 11: { menu11(id) } case 12: { menu12(id) } case 13: { menu19(id) } } menu_destroy(normaismenu); return PLUGIN_HANDLED; }
public menu(id) { new menu = menu_create("\r[rL' JailBreak] \wQuem voce quer Desafiar?:", "submenu"); new players[32], pnum, tempid; new szName[32], szTempid[10]; get_players(players, pnum, "a"); for( new i; i<pnum; i++ ) { tempid = players[i]; if (cs_get_user_team(tempid) != CS_TEAM_CT) { continue; } get_user_name(tempid, szName, 31); num_to_str(tempid, szTempid, 9); menu_additem(menu, szName, szTempid, 0); } menu_display(id, menu); return PLUGIN_HANDLED; }
public submenu(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 tempid = str_to_num(data); strip_user_weapons(tempid); give_item(tempid, "weapon_knife"); fm_set_rendering(tempid, kRenderFxGlowShell, 0, 0, 250, kRenderNormal, 20); strip_user_weapons(id); set_user_health(id, 100); give_item(id, "weapon_knife"); fm_set_rendering(id, kRenderFxGlowShell, 250, 0, 0, kRenderNormal, 20); new szName[32], szName2[32]; get_user_name(id, szName, 31); get_user_name(tempid, szName2, 31); set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10); show_hudmessage(0, "%s Foi Desafiado por %s^n a um Duelo de Facas", szName, szName2); if( is_user_alive(tempid) ) set_user_health(tempid, 100); menu_destroy(menu); return PLUGIN_HANDLED; }
public menu3(id) { new menu = menu_create("\r[rL' JailBreak] \wQuem voce quer Desafiar?:", "submenu3"); new players[32], pnum, tempid; new szName[32], szTempid[10]; get_players(players, pnum, "a"); for( new i; i<pnum; i++ ) { tempid = players[i]; if (cs_get_user_team(tempid) != CS_TEAM_CT) { continue; } get_user_name(tempid, szName, 31); num_to_str(tempid, szTempid, 9); menu_additem(menu, szName, szTempid, 0); } menu_display(id, menu); return PLUGIN_HANDLED; }
public submenu3(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 tempid = str_to_num(data); strip_user_weapons(tempid); give_item(tempid, "weapon_deagle"); cs_set_user_bpammo(tempid,CSW_DEAGLE,100) fm_set_rendering(tempid, kRenderFxGlowShell, 0, 0, 250, kRenderNormal, 20) strip_user_weapons(id) set_user_health(id, 255) give_item(id, "weapon_deagle") cs_set_user_bpammo(id,CSW_DEAGLE,100) fm_set_rendering(id, kRenderFxGlowShell, 250, 0, 0, kRenderNormal, 20) new szName[32], szName2[32] get_user_name(id, szName, 31); get_user_name(tempid, szName2, 31); set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10) show_hudmessage(0, "%s Foi Desafiado por %s^n a um Duelo de Deagle",szName, szName2) if( is_user_alive(tempid) ) set_user_health(tempid, 255); menu_destroy(menu); return PLUGIN_HANDLED; }
public menu2(id) { new menu = menu_create("\r[rL' JailBreak] \wQuem voce quer Desafiar?:", "submenu2"); new players[32], pnum, tempid; new szName[32], szTempid[10]; get_players(players, pnum, "a"); for( new i; i<pnum; i++ ) { tempid = players[i]; if (cs_get_user_team(tempid) != CS_TEAM_CT) { continue; } get_user_name(tempid, szName, 31); num_to_str(tempid, szTempid, 9); menu_additem(menu, szName, szTempid, 0); } menu_display(id, menu); return PLUGIN_HANDLED; }
public submenu2(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 tempid = str_to_num(data); strip_user_weapons(tempid); give_item(tempid, "weapon_hegrenade"); cs_set_user_bpammo(tempid,CSW_HEGRENADE,50) fm_set_rendering(tempid, kRenderFxGlowShell, 0, 0, 250, kRenderNormal, 20) strip_user_weapons(id) set_user_health(id, 255) give_item(id, "weapon_hegrenade") cs_set_user_bpammo(id,CSW_HEGRENADE,50) fm_set_rendering(id, kRenderFxGlowShell, 250, 0, 0, kRenderNormal, 20) new szName[32], szName2[32] get_user_name(id, szName, 31); get_user_name(tempid, szName2, 31); set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10) show_hudmessage(0, "%s Foi Desafiado por %s^n a um Duelo de Granadas",szName, szName2) if( is_user_alive(tempid) ) set_user_health(tempid, 255); menu_destroy(menu); return PLUGIN_HANDLED; }
public menu4(id) { new menu = menu_create("\r[rL' JailBreak] \wQuem voce quer Desafiar?:", "submenu4"); new players[32], pnum, tempid; new szName[32], szTempid[10]; get_players(players, pnum, "a"); for( new i; i<pnum; i++ ) { tempid = players[i]; if (cs_get_user_team(tempid) != CS_TEAM_CT) { continue; } get_user_name(tempid, szName, 31); num_to_str(tempid, szTempid, 9); menu_additem(menu, szName, szTempid, 0); } menu_display(id, menu); return PLUGIN_HANDLED; }
public submenu4(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 tempid = str_to_num(data); strip_user_weapons(tempid); give_item(tempid, "weapon_usp"); cs_set_user_bpammo(tempid, CSW_USP, 100); fm_set_rendering(tempid, kRenderFxGlowShell, 0, 0, 250, kRenderNormal, 20); strip_user_weapons(id); set_user_health(id, 255); give_item(id, "weapon_usp"); cs_set_user_bpammo(id, CSW_USP, 100); fm_set_rendering(id, kRenderFxGlowShell, 250, 0, 0, kRenderNormal, 20); new szName[32], szName2[32]; get_user_name(id, szName, 31); get_user_name(tempid, szName2, 31); set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10); show_hudmessage(0, "%s Foi Desafiado por %s^n a um Duelo de USP", szName, szName2); if( is_user_alive(tempid) ) set_user_health(tempid, 255); menu_destroy(menu); return PLUGIN_HANDLED; }
public menu5(id) { new menu = menu_create("\r[rL' JailBreak] \wQuem voce quer Desafiar?:", "submenu5"); new players[32], pnum, tempid; new szName[32], szTempid[10]; get_players(players, pnum, "a"); for( new i; i<pnum; i++ ) { tempid = players[i]; if (cs_get_user_team(tempid) != CS_TEAM_CT) { continue; } get_user_name(tempid, szName, 31); num_to_str(tempid, szTempid, 9); menu_additem(menu, szName, szTempid, 0); } menu_display(id, menu); return PLUGIN_HANDLED; }
public submenu5(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 tempid = str_to_num(data); strip_user_weapons(tempid); give_item(tempid, "weapon_m3"); cs_set_user_bpammo(tempid, CSW_M3, 100); fm_set_rendering(tempid, kRenderFxGlowShell, 0, 0, 250, kRenderNormal, 20); strip_user_weapons(id); set_user_health(id, 255); give_item(id, "weapon_m3"); cs_set_user_bpammo(id, CSW_M3, 100); fm_set_rendering(id, kRenderFxGlowShell, 250, 0, 0, kRenderNormal, 20); new szName[32], szName2[32]; get_user_name(id, szName, 31); get_user_name(tempid, szName2, 31); set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10); show_hudmessage(0, "%s Foi Desafiado por %s^n a um Duelo de M3", szName, szName2); if( is_user_alive(tempid) ) set_user_health(tempid, 255); menu_destroy(menu); return PLUGIN_HANDLED; }
public menu6(id) { new menu = menu_create("\r[rL' JailBreak] \wQuem voce quer Desafiar?:", "submenu6"); new players[32], pnum, tempid; new szName[32], szTempid[10]; get_players(players, pnum, "a"); for( new i; i<pnum; i++ ) { tempid = players[i]; if (cs_get_user_team(tempid) != CS_TEAM_CT) { continue; } get_user_name(tempid, szName, 31); num_to_str(tempid, szTempid, 9); menu_additem(menu, szName, szTempid, 0); } menu_display(id, menu); return PLUGIN_HANDLED; }
public submenu6(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 tempid = str_to_num(data); strip_user_weapons(tempid); give_item(tempid, "weapon_glock18"); cs_set_user_bpammo(tempid, CSW_GLOCK18, 100); fm_set_rendering(tempid, kRenderFxGlowShell, 0, 0, 250, kRenderNormal, 20); strip_user_weapons(id); set_user_health(id, 255); give_item(id, "weapon_glock18"); cs_set_user_bpammo(id, CSW_GLOCK18, 100); fm_set_rendering(id, kRenderFxGlowShell, 250, 0, 0, kRenderNormal, 20); new szName[32], szName2[32]; get_user_name(id, szName, 31); get_user_name(tempid, szName2, 31); set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10); show_hudmessage(0, "%s Foi Desafiado por %s^n a um Duelo de Glock", szName, szName2); if( is_user_alive(tempid) ) set_user_health(tempid, 255); menu_destroy(menu); return PLUGIN_HANDLED; }
public menu7(id) { new menu = menu_create("\r[rL' JailBreak] \wQuem voce quer Desafiar?:", "submenu7"); new players[32], pnum, tempid; new szName[32], szTempid[10]; get_players(players, pnum, "a"); for( new i; i<pnum; i++ ) { tempid = players[i]; if (cs_get_user_team(tempid) != CS_TEAM_CT) { continue; } get_user_name(tempid, szName, 31); num_to_str(tempid, szTempid, 9); menu_additem(menu, szName, szTempid, 0); } menu_display(id, menu); return PLUGIN_HANDLED; }
public submenu7(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 tempid = str_to_num(data); strip_user_weapons(tempid); give_item(tempid, "weapon_awp"); cs_set_user_bpammo(tempid,CSW_AWP, 100) fm_set_rendering(tempid, kRenderFxGlowShell, 0, 0, 250, kRenderNormal, 20) strip_user_weapons(id) set_user_health(id, 255) give_item(id, "weapon_awp") cs_set_user_bpammo(id,CSW_AWP, 100) fm_set_rendering(id, kRenderFxGlowShell, 250, 0, 0, kRenderNormal, 20) new szName[32], szName2[32] get_user_name(id, szName, 31); get_user_name(tempid, szName2, 31); set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10) show_hudmessage(0, "%s Foi Desafiado por %s^n a um Duelo de AWP",szName, szName2) if( is_user_alive(tempid) ) set_user_health(tempid, 255); menu_destroy(menu); return PLUGIN_HANDLED; }
public menu8(id) { new menu = menu_create("\r[rL' JailBreak] \wQuem voce quer Desafiar?:", "submenu8"); new players[32], pnum, tempid; new szName[32], szTempid[10]; get_players(players, pnum, "a"); for( new i; i<pnum; i++ ) { tempid = players[i]; if (cs_get_user_team(tempid) != CS_TEAM_CT) { continue; } get_user_name(tempid, szName, 31); num_to_str(tempid, szTempid, 9); menu_additem(menu, szName, szTempid, 0); } menu_display(id, menu); return PLUGIN_HANDLED; }
public submenu8(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 tempid = str_to_num(data); strip_user_weapons(tempid); give_item(tempid, "weapon_scout"); cs_set_user_bpammo(tempid,CSW_SCOUT, 100) fm_set_rendering(tempid, kRenderFxGlowShell, 0, 0, 250, kRenderNormal, 20) strip_user_weapons(id) set_user_health(id, 255) give_item(id, "weapon_scout") cs_set_user_bpammo(id,CSW_SCOUT, 100) fm_set_rendering(id, kRenderFxGlowShell, 250, 0, 0, kRenderNormal, 20) new szName[32], szName2[32] get_user_name(id, szName, 31); get_user_name(tempid, szName2, 31); set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10) show_hudmessage(0, "%s Foi Desafiado por %s^n a um Duelo de Scout",szName, szName2) if( is_user_alive(tempid) ) set_user_health(tempid, 255); menu_destroy(menu); return PLUGIN_HANDLED; }
public menu9(id) { new menu = menu_create("\r[rL' JailBreak] \wQuem voce quer Desafiar?:", "submenu9"); new players[32], pnum, tempid; new szName[32], szTempid[10]; get_players(players, pnum, "a"); for( new i; i<pnum; i++ ) { tempid = players[i]; if (cs_get_user_team(tempid) != CS_TEAM_CT) { continue; } get_user_name(tempid, szName, 31); num_to_str(tempid, szTempid, 9); menu_additem(menu, szName, szTempid, 0); } menu_display(id, menu); return PLUGIN_HANDLED; }
public submenu9(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 tempid = str_to_num(data); strip_user_weapons(tempid); give_item(tempid, "weapon_m3"); cs_set_user_bpammo(tempid,CSW_M3, 100) fm_set_rendering(tempid, kRenderFxGlowShell, 0, 0, 250, kRenderNormal, 20) strip_user_weapons(id) set_user_health(id, 255) give_item(id, "weapon_m3") cs_set_user_bpammo(id,CSW_M3, 100) fm_set_rendering(id, kRenderFxGlowShell, 250, 0, 0, kRenderNormal, 20) new szName[32], szName2[32] get_user_name(id, szName, 31); get_user_name(tempid, szName2, 31); set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10) show_hudmessage(0, "%s Foi Desafiado por %s^n a um Duelo de M3",szName, szName2) if( is_user_alive(tempid) ) set_user_health(tempid, 255); menu_destroy(menu); return PLUGIN_HANDLED; }
public menu10(id) { new menu = menu_create("\r[rL' JailBreak] \wQuem voce quer Desafiar?:", "submenu10"); new players[32], pnum, tempid; new szName[32], szTempid[10]; get_players(players, pnum, "a"); for( new i; i<pnum; i++ ) { tempid = players[i]; if (cs_get_user_team(tempid) != CS_TEAM_CT) { continue; } get_user_name(tempid, szName, 31); num_to_str(tempid, szTempid, 9); menu_additem(menu, szName, szTempid, 0); } menu_display(id, menu); return PLUGIN_HANDLED; }
public submenu10(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 tempid = str_to_num(data); strip_user_weapons(tempid); give_item(tempid, "weapon_xm1014"); cs_set_user_bpammo(tempid,CSW_XM1014, 100) fm_set_rendering(tempid, kRenderFxGlowShell, 0, 0, 250, kRenderNormal, 20) strip_user_weapons(id) set_user_health(id, 255) give_item(id, "weapon_xm1014") cs_set_user_bpammo(id,CSW_XM1014, 100) fm_set_rendering(id, kRenderFxGlowShell, 250, 0, 0, kRenderNormal, 20) new szName[32], szName2[32] get_user_name(id, szName, 31); get_user_name(tempid, szName2, 31); set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10) show_hudmessage(0, "%s Foi Desafiado por %s^n a um Duelo de XM1014",szName, szName2) if( is_user_alive(tempid) ) set_user_health(tempid, 255); menu_destroy(menu); return PLUGIN_HANDLED; }
public menu11(id) { new menu = menu_create("\r[rL' JailBreak] \wQuem voce quer Desafiar?:", "submenu11"); new players[32], pnum, tempid; new szName[32], szTempid[10]; get_players(players, pnum, "a"); for( new i; i<pnum; i++ ) { tempid = players[i]; if (cs_get_user_team(tempid) != CS_TEAM_CT) { continue; } get_user_name(tempid, szName, 31); num_to_str(tempid, szTempid, 9); menu_additem(menu, szName, szTempid, 0); } menu_display(id, menu); return PLUGIN_HANDLED; }
public submenu11(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 tempid = str_to_num(data); strip_user_weapons(tempid); give_item(tempid, "weapon_m4a1"); cs_set_user_bpammo(tempid,CSW_M4A1, 200) fm_set_rendering(tempid, kRenderFxGlowShell, 0, 0, 250, kRenderNormal, 20) strip_user_weapons(id) set_user_health(id, 255) give_item(id, "weapon_m4a1") cs_set_user_bpammo(id,CSW_M4A1, 200) fm_set_rendering(id, kRenderFxGlowShell, 250, 0, 0, kRenderNormal, 20) new szName[32], szName2[32] get_user_name(id, szName, 31); get_user_name(tempid, szName2, 31); set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10) show_hudmessage(0, "%s Foi Desafiado por %s^n a um Duelo de M4A1",szName, szName2) if( is_user_alive(tempid) ) set_user_health(tempid, 255); menu_destroy(menu); return PLUGIN_HANDLED; }
public menu12(id) { new menu = menu_create("\r[rL' JailBreak] \wQuem voce quer Desafiar?:", "submenu12"); new players[32], pnum, tempid; new szName[32], szTempid[10]; get_players(players, pnum, "a"); for( new i; i<pnum; i++ ) { tempid = players[i]; if (cs_get_user_team(tempid) != CS_TEAM_CT) { continue; } get_user_name(tempid, szName, 31); num_to_str(tempid, szTempid, 9); menu_additem(menu, szName, szTempid, 0); } menu_display(id, menu); return PLUGIN_HANDLED; }
public submenu12(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 tempid = str_to_num(data); strip_user_weapons(tempid); give_item(tempid, "weapon_ak47"); cs_set_user_bpammo(tempid,CSW_AK47, 200) fm_set_rendering(tempid, kRenderFxGlowShell, 0, 0, 250, kRenderNormal, 20) strip_user_weapons(id) set_user_health(id, 255) give_item(id, "weapon_ak47") cs_set_user_bpammo(id,CSW_AK47, 200) fm_set_rendering(id, kRenderFxGlowShell, 250, 0, 0, kRenderNormal, 20) new szName[32], szName2[32] get_user_name(id, szName, 31); get_user_name(tempid, szName2, 31); set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10) show_hudmessage(0, "%s Foi Desafiado por %s^n a um Duelo de AK47",szName, szName2) if( is_user_alive(tempid) ) set_user_health(tempid, 255); menu_destroy(menu); return PLUGIN_HANDLED; }
public menu19(id) { new menu = menu_create("\r[rL' JailBreak] \wQuem voce quer Desafiar?:", "submenu19"); new players[32], pnum, tempid; new szName[32], szTempid[10]; get_players(players, pnum, "a"); for( new i; i<pnum; i++ ) { tempid = players[i]; if (cs_get_user_team(tempid) != CS_TEAM_CT) { continue; } get_user_name(tempid, szName, 31); num_to_str(tempid, szTempid, 9); menu_additem(menu, szName, szTempid, 0); } menu_display(id, menu); return PLUGIN_HANDLED; }
public submenu19(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 tempid = str_to_num(data); strip_user_weapons(tempid); give_item(tempid, "weapon_m249"); cs_set_user_bpammo(tempid,CSW_M249, 200) fm_set_rendering(tempid, kRenderFxGlowShell, 0, 0, 250, kRenderNormal, 20) strip_user_weapons(id) set_user_health(id, 255) give_item(id, "weapon_m249") cs_set_user_bpammo(id,CSW_M249, 200) fm_set_rendering(id, kRenderFxGlowShell, 250, 0, 0, kRenderNormal, 20) new szName[32], szName2[32] get_user_name(id, szName, 31); get_user_name(tempid, szName2, 31); set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10) show_hudmessage(0, "%s Foi Desafiado por %s^n a um Duelo de Rambo",szName, szName2) if( is_user_alive(tempid) ) set_user_health(tempid, 255); menu_destroy(menu); return PLUGIN_HANDLED; }
public fw_primary_attack(ent) { //Get owner of entity new id = pev(ent,pev_owner) //if he's not alive if(!is_user_alive(id)) { return HAM_IGNORED } //If player is in lr and can shoot deagle //Search enemy new players[32], pnum, tempid get_players(players, pnum, "a") for(new i; i < pnum; i++) { tempid = players[i] //if he's in lr and can't shoot deagle and is alive if(is_user_alive(tempid) && (id !=tempid)) { menu13(id, tempid) return PLUGIN_CONTINUE } } return HAM_HANDLED }
public fw_primary_attack2(ent) { //Get owner of entity new id = pev(ent,pev_owner) //if he's not alive if(!is_user_alive(id)) { return HAM_IGNORED } //If player is in lr and can shoot deagle //Search enemy new players[32], pnum, tempid get_players(players, pnum, "a") for(new i; i < pnum; i++) { tempid = players[i] //if he's in lr and can't shoot deagle and is alive if(is_user_alive(tempid) && (id !=tempid)) { menu14(id, tempid) return PLUGIN_CONTINUE } } return HAM_HANDLED }
public fw_primary_attack3(ent) { //Get owner of entity new id = pev(ent,pev_owner) //if he's not alive if(!is_user_alive(id)) { return HAM_IGNORED } //If player is in lr and can shoot deagle //Search enemy new players[32], pnum, tempid get_players(players, pnum, "a") for(new i; i < pnum; i++) { tempid = players[i] //if he's in lr and can't shoot deagle and is alive if(is_user_alive(tempid) && (id !=tempid)) { menu15(id, tempid) return PLUGIN_CONTINUE } } return HAM_HANDLED }
public fw_primary_attack4(ent) { //Get owner of entity new id = pev(ent,pev_owner) //if he's not alive if(!is_user_alive(id)) { return HAM_IGNORED } //If player is in lr and can shoot deagle //Search enemy new players[32], pnum, tempid get_players(players, pnum, "a") for(new i; i < pnum; i++) { tempid = players[i] //if he's in lr and can't shoot deagle and is alive if(is_user_alive(tempid) && (id !=tempid)) { menu16(id, tempid) return PLUGIN_CONTINUE } } return HAM_HANDLED }
public fw_primary_attack5(ent) { //Get owner of entity new id = pev(ent,pev_owner) //if he's not alive if(!is_user_alive(id)) { return HAM_IGNORED } //If player is in lr and can shoot deagle //Search enemy new players[32], pnum, tempid get_players(players, pnum, "a") for(new i; i < pnum; i++) { tempid = players[i] //if he's in lr and can't shoot deagle and is alive if(is_user_alive(tempid) && (id !=tempid)) { menu17(id, tempid) return PLUGIN_CONTINUE } } return HAM_HANDLED }
public fw_primary_attack6(ent) { //Get owner of entity new id = pev(ent,pev_owner) //if he's not alive if(!is_user_alive(id)) { return HAM_IGNORED } //If player is in lr and can shoot deagle //Search enemy new players[32], pnum, tempid get_players(players, pnum, "a") for(new i; i < pnum; i++) { tempid = players[i] //if he's in lr and can't shoot deagle and is alive if(is_user_alive(tempid) && (id !=tempid)) { menu18(id, tempid) return PLUGIN_CONTINUE } } return HAM_HANDLED }
public s4s(id) { new s4smenu = menu_create("\r[rL ' Jailbreak] \wEscolha o a arma que voce quer:", "subs4s"); menu_additem(s4smenu, "\wDEAGLE", "1", 0); menu_additem(s4smenu, "\wUSP", "2", 0); menu_additem(s4smenu, "\wGLOCK", "3", 0); menu_additem(s4smenu, "\wAWP", "4", 0); menu_additem(s4smenu, "\wSCOUT", "5", 0); menu_additem(s4smenu, "\wM3", "6", 0);
menu_setprop(s4smenu, MPROP_EXIT, MEXIT_ALL); menu_display(id, s4smenu, 0);
}
public subs4s(id, s4smenu, item) { if (item == MENU_EXIT) { menu_destroy(s4smenu); return PLUGIN_HANDLED; } new Data[6], Name[64]; new Access, Callback; menu_item_getinfo(s4smenu, item, Access, Data,5, Name, 63, Callback); new Key = str_to_num(Data); switch (Key) { case 1: { new tempid menu13(id, tempid) } case 2: { new tempid menu14(id, tempid) } case 3: { new tempid menu15(id, tempid) } case 4: { new tempid menu16(id, tempid) } case 5: { new tempid menu17(id, tempid) } case 6: { new tempid menu18(id, tempid) } } menu_destroy(s4smenu); return PLUGIN_HANDLED; }
public menu17(id, tempid) { new menu = menu_create("\r[rL' JailBreak] \wQuem voce quer Desafiar?:", "gun_switch5"); new players[32], pnum, tempid; new szName[32], szTempid[10]; get_players(players, pnum, "a"); for( new i; i<pnum; i++ ) { tempid = players[i]; if (cs_get_user_team(tempid) != CS_TEAM_CT) { continue; } get_user_name(tempid, szName, 31); num_to_str(tempid, szTempid, 9); menu_additem(menu, szName, szTempid, 0); } menu_display(id, menu); return PLUGIN_HANDLED; }
public gun_switch5(id, tempid, menu, item) { if( item == MENU_EXIT ) { menu_destroy(menu); return PLUGIN_HANDLED; } if(is_user_alive(tempid) && (id !=tempid) && !shot_deagle[id]) { new data[6], iName[64]; new access, callback; menu_item_getinfo(menu, item, access, data,5, iName, 63, callback); strip_user_weapons(tempid) set_user_health ( id, 255 ) new scout = give_item(tempid, "weapon_scout") cs_set_weapon_ammo(scout, 1) cs_set_user_bpammo(tempid, CSW_SCOUT, 0) shot_deagle[id] = true shot_deagle[tempid] = false fm_set_rendering(id, kRenderFxGlowShell, 250, 0, 0, kRenderNormal, 20) new szName[32], szName2[32] get_user_name(id, szName, 31); get_user_name(tempid, szName2, 31); set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10) show_hudmessage(0, "%s Foi Desafiado por %s^n a um Duelo de Scouts (Tiro Por Tiro)",szName, szName2) if( is_user_alive(tempid) ) set_user_health(tempid, 255); menu_destroy(menu); return PLUGIN_HANDLED; } return PLUGIN_HANDLED }
public menu13(id, tempid) { new menu = menu_create("\r[rL' JailBreak] \wQuem voce quer Desafiar?:", "gun_switch"); new players[32], pnum, tempid; new szName[32], szTempid[10]; get_players(players, pnum, "a"); for( new i; i<pnum; i++ ) { tempid = players[i]; if (cs_get_user_team(tempid) != CS_TEAM_CT) { continue; } get_user_name(tempid, szName, 31); num_to_str(tempid, szTempid, 9); menu_additem(menu, szName, szTempid, 0); } menu_display(id, menu); return PLUGIN_HANDLED; }
public gun_switch(id, tempid, menu, item) { if( item == MENU_EXIT ) { menu_destroy(menu); return PLUGIN_HANDLED; } if(is_user_alive(tempid) && (id !=tempid) && !shot_deagle[id]) { new data[6], iName[64]; new access, callback; menu_item_getinfo(menu, item, access, data,5, iName, 63, callback); strip_user_weapons(tempid) set_user_health ( id, 255 ) new deagle = give_item(tempid, "weapon_deagle") cs_set_weapon_ammo(deagle, 1) cs_set_user_bpammo(tempid, CSW_DEAGLE, 0) shot_deagle[id] = true shot_deagle[tempid] = false fm_set_rendering(id, kRenderFxGlowShell, 250, 0, 0, kRenderNormal, 20) new szName[32], szName2[32] get_user_name(id, szName, 31); get_user_name(tempid, szName2, 31); set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10) show_hudmessage(0, "%s Foi Desafiado por %s^n a um Duelo de Deagle (Tiro Por Tiro)",szName, szName2) if( is_user_alive(tempid) ) set_user_health(tempid, 255); menu_destroy(menu); return PLUGIN_HANDLED; } return PLUGIN_HANDLED }
public menu14(id, tempid) { new menu = menu_create("\r[rL' JailBreak] \wQuem voce quer Desafiar?:", "gun_switch2"); new players[32], pnum, tempid; new szName[32], szTempid[10]; get_players(players, pnum, "a"); for( new i; i<pnum; i++ ) { tempid = players[i]; if (cs_get_user_team(tempid) != CS_TEAM_CT) { continue; } get_user_name(tempid, szName, 31); num_to_str(tempid, szTempid, 9); menu_additem(menu, szName, szTempid, 0); } menu_display(id, menu); return PLUGIN_HANDLED; }
public gun_switch2(id, tempid, menu, item) { if( item == MENU_EXIT ) { menu_destroy(menu); return PLUGIN_HANDLED; } if(is_user_alive(tempid) && (id !=tempid) && !shot_deagle[id]) { new data[6], iName[64]; new access, callback; menu_item_getinfo(menu, item, access, data,5, iName, 63, callback); strip_user_weapons(tempid) set_user_health ( id, 255 ) new usp = give_item(tempid, "weapon_usp") cs_set_weapon_ammo(usp, 1) cs_set_user_bpammo(tempid, CSW_USP, 0) shot_deagle[id] = true shot_deagle[tempid] = false fm_set_rendering(id, kRenderFxGlowShell, 250, 0, 0, kRenderNormal, 20) new szName[32], szName2[32] get_user_name(id, szName, 31); get_user_name(tempid, szName2, 31); set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10) show_hudmessage(0, "%s Foi Desafiado por %s^n a um Duelo de USP (Tiro Por Tiro)",szName, szName2) if( is_user_alive(tempid) ) set_user_health(tempid, 255); menu_destroy(menu); return PLUGIN_HANDLED; } return PLUGIN_HANDLED }
public menu15(id, tempid) { new menu = menu_create("\r[rL' JailBreak] \wQuem voce quer Desafiar?:", "gun_switch3"); new players[32], pnum, tempid; new szName[32], szTempid[10]; get_players(players, pnum, "a"); for( new i; i<pnum; i++ ) { tempid = players[i]; if (cs_get_user_team(tempid) != CS_TEAM_CT) { continue; } get_user_name(tempid, szName, 31); num_to_str(tempid, szTempid, 9); menu_additem(menu, szName, szTempid, 0); } menu_display(id, menu); return PLUGIN_HANDLED; }
public gun_switch3(id, tempid, menu, item) { if( item == MENU_EXIT ) { menu_destroy(menu); return PLUGIN_HANDLED; } if(is_user_alive(tempid) && (id !=tempid) && !shot_deagle[id]) { new data[6], iName[64]; new access, callback; menu_item_getinfo(menu, item, access, data,5, iName, 63, callback); strip_user_weapons(tempid) set_user_health ( id, 255 ) new glock = give_item(tempid, "weapon_glock18") cs_set_weapon_ammo(glock, 1) cs_set_user_bpammo(tempid, CSW_GLOCK18, 0) shot_deagle[id] = true shot_deagle[tempid] = false fm_set_rendering(id, kRenderFxGlowShell, 250, 0, 0, kRenderNormal, 20) new szName[32], szName2[32] get_user_name(id, szName, 31); get_user_name(tempid, szName2, 31); set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10) show_hudmessage(0, "%s Foi Desafiado por %s^n a um Duelo de Glock (Tiro Por Tiro)",szName, szName2) if( is_user_alive(tempid) ) set_user_health(tempid, 255); menu_destroy(menu); return PLUGIN_HANDLED; } return PLUGIN_HANDLED }
public menu16(id, tempid) { new menu = menu_create("\r[rL' JailBreak] \wQuem voce quer Desafiar?:", "gun_switch4"); new players[32], pnum, tempid; new szName[32], szTempid[10]; get_players(players, pnum, "a"); for( new i; i<pnum; i++ ) { tempid = players[i]; if (cs_get_user_team(tempid) != CS_TEAM_CT) { continue; } get_user_name(tempid, szName, 31); num_to_str(tempid, szTempid, 9); menu_additem(menu, szName, szTempid, 0); } menu_display(id, menu); return PLUGIN_HANDLED; }
public gun_switch4(id, tempid, menu, item) { if( item == MENU_EXIT ) { menu_destroy(menu); return PLUGIN_HANDLED; } if(is_user_alive(tempid) && (id !=tempid) && !shot_deagle[id]) { new data[6], iName[64]; new access, callback; menu_item_getinfo(menu, item, access, data,5, iName, 63, callback); strip_user_weapons(tempid) set_user_health ( id, 255 ) new awp = give_item(tempid, "weapon_awp") cs_set_weapon_ammo(awp, 1) cs_set_user_bpammo(tempid, CSW_AWP, 0) shot_deagle[id] = true shot_deagle[tempid] = false fm_set_rendering(id, kRenderFxGlowShell, 250, 0, 0, kRenderNormal, 20) new szName[32], szName2[32] get_user_name(id, szName, 31); get_user_name(tempid, szName2, 31); set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10) show_hudmessage(0, "%s Foi Desafiado por %s^n a um Duelo de AWP(Tiro Por Tiro)",szName, szName2) if( is_user_alive(tempid) ) set_user_health(tempid, 255); menu_destroy(menu); return PLUGIN_HANDLED; } return PLUGIN_HANDLED }
public menu18(id, tempid) { new menu = menu_create("\r[rL' JailBreak] \wQuem voce quer Desafiar?:", "gun_switch6"); new players[32], pnum, tempid; new szName[32], szTempid[10]; get_players(players, pnum, "a"); for( new i; i<pnum; i++ ) { tempid = players[i]; if (cs_get_user_team(tempid) != CS_TEAM_CT) { continue; } get_user_name(tempid, szName, 31); num_to_str(tempid, szTempid, 9); menu_additem(menu, szName, szTempid, 0); } menu_display(id, menu); return PLUGIN_HANDLED; }
public gun_switch6(id, tempid, menu, item) { if( item == MENU_EXIT ) { menu_destroy(menu); return PLUGIN_HANDLED; } if(is_user_alive(tempid) && (id !=tempid) && !shot_deagle[id]) { new data[6], iName[64]; new access, callback; menu_item_getinfo(menu, item, access, data,5, iName, 63, callback); strip_user_weapons(tempid) set_user_health ( id, 255 ) new m3 = give_item(tempid, "weapon_m3") cs_set_weapon_ammo(m3, 1) cs_set_user_bpammo(tempid, CSW_M3, 0) shot_deagle[id] = true shot_deagle[tempid] = false fm_set_rendering(id, kRenderFxGlowShell, 250, 0, 0, kRenderNormal, 20) new szName[32], szName2[32] get_user_name(id, szName, 31); get_user_name(tempid, szName2, 31); set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10) show_hudmessage(0, "%s Foi Desafiado por %s^n a um Duelo de M3 (Tiro Por Tiro)",szName, szName2) if( is_user_alive(tempid) ) set_user_health(tempid, 255); menu_destroy(menu); return PLUGIN_HANDLED; } return PLUGIN_HANDLED }
What's wrong in the code?
Last edited by manuelpuyol; 11-12-2011 at 19:37.
|
|