lf2man123
|
分享:
x0
|
[1.6][插件] 重生的问题
我写了重生会出现菜单但是没有出现菜单有没有大大可以帮我一下-,-? 复制程式
public player_spawn(id){ static CsTeams:team
if(!is_user_connected(id)) return HAM_IGNORED
set_pdata_float(id, m_fNextHudTextArgsGameTime, get_gametime() + 999999.0) player_strip_weapons(id) if(g_RoundEnd) { g_RoundEnd = 0 g_JailDay++ }
set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 0)
clear_bit(g_PlayerCrowbar, id) clear_bit(g_PlayerWanted, id) team = cs_get_user_team(id)
switch(team) { case(CS_TEAM_T): { g_PlayerLast = 0 if(!g_PlayerReason[id]) g_PlayerReason[id] = random_num(1, 6)
player_hudmessage(id, 0, 5.0, {255, 0, 255}, "%L %L", LANG_SERVER, "JBE_PRISONER_REASON", LANG_SERVER, g_Reasons[g_PlayerReason[id]])
set_user_info(id, "model", "jbemodel") entity_set_int(id, EV_INT_body, 2) if(is_freeday() || get_bit(g_FreedayAuto, id)) { freeday_set(0, id) clear_bit(g_FreedayAuto, id) } else { entity_set_int(id, EV_INT_skin, random_num(0, 2)) }
if(g_CrowbarCount < get_pcvar_num(gp_CrowbarMax)) { if(random_num(0, g_MaxClients) > (g_MaxClients / 2)) { g_CrowbarCount++ set_bit(g_PlayerCrowbar, id) } } cs_set_user_armor(id, 0, CS_ARMOR_NONE) } case(CS_TEAM_CT): { gun_check(id) g_PlayerSimon[id]++ set_user_info(id, "model", "jbemodel") entity_set_int(id, EV_INT_body, 3) cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM) } } first_join(id) return HAM_IGNORED} 复制程式
public primgun_menu(id){ if(!IsPlayer(id)) return PLUGIN_HANDLED new primgunmenu = menu_create("\yChoose your weapon:", "sub_primgun_menu")
menu_additem(primgunmenu, "\wM4a1", "1", 0); menu_additem(primgunmenu, "\wAk 47", "2", 0); menu_additem(primgunmenu, "\wScout", "3", 0); menu_additem(primgunmenu, "\wAwp", "4", 0); menu_additem(primgunmenu, "\wMp5", "5", 0); menu_setprop(primgunmenu, MPROP_EXIT, MEXIT_ALL); menu_display(id, primgunmenu, 0); return PLUGIN_HANDLED}
public sub_primgun_menu(id, primgunmenu, item){ if (item == MENU_EXIT) { menu_destroy(primgunmenu); return PLUGIN_HANDLED; } new Data[7], Name[64]; new Access, Callback; menu_item_getinfo(primgunmenu, item, Access, Data,5, Name, 63, Callback); new Key = str_to_num(Data); switch (Key) { case 1: { primgun1(id) } case 2: { primgun2(id) } case 3: { primgun3(id) } case 4: { primgun4(id) } case 5: { primgun5(id) } } menu_destroy(primgunmenu); return PLUGIN_HANDLED;}
public primgun1(id){ give_item(id, "weapon_m4a1") give_item(id, "weapon_usp") cs_set_user_bpammo(id, CSW_USP, 100) cs_set_user_bpammo(id, CSW_M4A1, 200)}
public primgun2(id){ give_item(id, "weapon_ak47") give_item(id, "weapon_usp") cs_set_user_bpammo(id, CSW_USP, 100) cs_set_user_bpammo(id, CSW_AK47, 200)}
public primgun3(id){ give_item(id, "weapon_scout") give_item(id, "weapon_usp") cs_set_user_bpammo(id, CSW_USP, 100) cs_set_user_bpammo(id, CSW_SCOUT, 200)}
public primgun4(id){ give_item(id, "weapon_awp") give_item(id, "weapon_usp") cs_set_user_bpammo(id, CSW_USP, 100) cs_set_user_bpammo(id, CSW_AWP, 200)}
public primgun5(id){ give_item(id, "weapon_mp5navy") give_item(id, "weapon_usp") cs_set_user_bpammo(id, CSW_USP, 100) cs_set_user_bpammo(id, CSW_MP5NAVY, 200)} 我有加new等等的东西,没有错误,ct重生也不会出现求大大解答
[ 此文章被lf2man123在2011-06-18 19:26重新编辑 ]
|