Member
Join Date: May 2010
Location: Lyon
|
06-05-2010
, 12:28
Re: Gros Probleme du MoD Furiens
|
#100
|
Le plugins je le trouve genial comme il ai le seul souci, c'est que les ct garde la m4, et deagle, et malheureusement les terro eux garde seulement un cut, ce qui n'ai pas tres equilibrer.
Je pense que pour regler l'histoire d'equlibrage, les ct devrait juste avoir un cut a leur tour, et les terro un ak47 et deagles.
Voici mes plugins:
Furiens_weapons_amxx
PHP Code:
#include <amxmodx> #include <hamsandwich> #include <fun> #include <cstrike> public plugin_init() { register_plugin("furiens_weapons", "1.0", "GuismoO") RegisterHam(Ham_Spawn, "player", "Player_Spawn", 1) } public Player_Spawn(id) { if(is_user_alive(id)) { strip_user_weapons(id) switch(cs_get_user_team(id)) { case CS_TEAM_T: { give_item(id,"weapon_knife") give_item(id,"weapon_hegrenade") give_item(id, "weapon_flashbang") give_item(id, "weapon_smokegrenade") } case CS_TEAM_CT: { give_item(id,"weapon_deagle") give_item(id,"weapon_knife") give_item(id,"weapon_m4a1") cs_set_user_bpammo( id, CSW_DEAGLE, 35) cs_set_user_bpammo( id, CSW_M4A1, 90) } } }
furiens_amxx
PHP Code:
/* Formatright © 2009, ConnorMcLeod
PHP Code:
[center] Furiens is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Furiens; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <amxmodx> #include <cstrike> #include <engine> #include <fun> #include <hamsandwich> #define VERSION "0.0.2" #define MAX_PLAYERS 32 #define Ham_Player_ResetMaxSpeed Ham_Item_PreFrame new g_pCvarGravity, g_pCvarMaxSpeed public plugin_init() { register_plugin("Furiens", VERSION, "ConnorMcLeod") g_pCvarGravity = register_cvar("amx_furien_gravity", "0.375") g_pCvarMaxSpeed = register_cvar("amx_furien_maxspeed", "500") RegisterHam(Ham_Spawn, "player", "Player_Spawn_Post", 1) RegisterHam(Ham_Player_ResetMaxSpeed, "player", "Player_ResetMaxSpeed", 1) new iEnt = create_entity("info_target") entity_set_string(iEnt, EV_SZ_classname, "check_speed") entity_set_float(iEnt, EV_FL_nextthink, get_gametime() + 0.1) register_think("check_speed", "Set_Terrorist_Visibility") } public plugin_cfg() { set_cvar_num("sv_maxspeed", 1100) set_cvar_num("cl_forwardspeed", 1100) set_cvar_num("cl_sidespeed", 1100) set_cvar_num("cl_backspeed", 1100) } public Player_Spawn_Post( id ) { if( is_user_alive(id) ) { if( cs_get_user_team(id) == CS_TEAM_T ) { set_user_gravity(id, get_pcvar_float(g_pCvarGravity)) set_user_footsteps(id, 1) } else { set_user_footsteps(id, 0) } set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 0) } } public Player_ResetMaxSpeed( id ) { if( is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_T && get_user_maxspeed(id) != -1.0 ) { set_user_maxspeed(id, get_pcvar_float(g_pCvarMaxSpeed)) } } public Set_Terrorist_Visibility( iEnt ) { entity_set_float(iEnt, EV_FL_nextthink, get_gametime() + 0.1) new iPlayers[MAX_PLAYERS], iNum, id, Float:fVecVelocity[3], iSpeed get_players(iPlayers, iNum, "ae", "TERRORIST") new iInvisibility for(new i; i<iNum; i++) { id = iPlayers[i] if( get_user_weapon(id) == CSW_KNIFE ) { entity_get_vector(id, EV_VEC_velocity, fVecVelocity) iSpeed = floatround( vector_length(fVecVelocity) ) if( iSpeed < 255 ) { iInvisibility = iSpeed - (256 - iSpeed) / 3 if( iInvisibility < 0 ) { iInvisibility = 0 } set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, iInvisibility) } else { set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 0) } } else { set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 0) } } } [/center]
furiens_shop
PHP Code:
#include <amxmodx> #include <fakemeta> #include <hamsandwich> #include <fun> #include <cstrike> #define MAX_PLAYERS 32 #define IsPlayer(%1) ( 1 <= %1 <= g_iMaxPlayers ) new g_iMaxPlayers new const g_ModelSuperKnife[] = "models/furien_superknife.mdl" new bool:g_HasParachute[MAX_PLAYERS+1] new bool:g_HasAutoBhop[MAX_PLAYERS+1] new bool:g_HasSuperKnife[MAX_PLAYERS+1] new grenade_ct, nightvision_ct, defuser_ct, hpcost_ct, hp_ct, armor_ct, armorcost_ct, parachute_ct, m249_ct new grenade_t, flash_t, frost_t, hp_t, hpcost_t, armor_t, armorcost_t, autobunny_t, superknife_t, knife_multiplier public plugin_init() { // Plugin Info register_plugin("Furiens Shop", "1.5", "BenJi / Fr33m@n") // HAMSANDWICH RegisterHam(Ham_Player_Jump, "player", "ham_PlayerJump_Pre", 1) RegisterHam(Ham_TakeDamage, "player", "ham_TakeDamage_Pre") RegisterHam(Ham_Spawn, "player", "ham_PlayerSpawn_Post", 1) RegisterHam(Ham_Item_Deploy, "weapon_knife", "ham_ItemDeploy_Post", 1) // GetMaxPlayers g_iMaxPlayers = get_maxplayers() // Commandes register_clcmd("say /shop", "shopmenu") register_clcmd("say shop", "shopmenu") register_concmd("shop", "shopmenu") // Prix de chaque Item Menu CT grenade_ct = register_cvar("fs_grenade_ct", "5000") nightvision_ct = register_cvar("fs_nightvision_ct", "1500") defuser_ct = register_cvar("fs_defuser_ct", "300") hpcost_ct = register_cvar("fs_hpcost_ct", "5000") hp_ct = register_cvar("fs_hp_ct", "100") armor_ct = register_cvar("fs_amor_ct", "100") armorcost_ct = register_cvar("fs_armorcost_ct", "2500") parachute_ct = register_cvar("fs_parachute_ct", "100") m249_ct = register_cvar("fs_m249_ct", "10000") // Prix de chaque Item Menu T grenade_t = register_cvar("fs_grenade_t", "5000") flash_t = register_cvar("fs_flash_t", "2000") frost_t = register_cvar("fs_frost_t", "3000") hp_t = register_cvar("fs_hp_t", "25") hpcost_t = register_cvar("fs_hpcost_t", "8000") armor_t = register_cvar("fs_armor_t", "100") armorcost_t = register_cvar("fs_armorcost_t", "4000") autobunny_t = register_cvar("fs_autobunny_t", "6000") superknife_t = register_cvar("fs_superknife_t", "10000") knife_multiplier = register_cvar("fs_knife_damage", "2.9") } public plugin_precache() { precache_model(g_ModelSuperKnife) } public shopmenu(id) { if ( !is_user_alive(id) ) return new menu new menuText[32] if ( cs_get_user_team(id) == CS_TEAM_CT ) { menu = menu_create("Shop Menu [CT]", "menu_ct") formatex( menuText, charsmax(menuText), "wGrenade - r[%d $]", get_pcvar_num(grenade_ct) ) menu_additem(menu, menuText, "1") formatex( menuText, charsmax(menuText), "wNightvision - r[%d $]", get_pcvar_num(nightvision_ct) ) menu_additem(menu, menuText, "2") formatex( menuText, charsmax(menuText), "wDefuser - r[%d $]", get_pcvar_num(defuser_ct) ) menu_additem(menu, menuText, "3") formatex( menuText, charsmax(menuText), "w+%d HP - r[%d $]", get_pcvar_num(hp_ct), get_pcvar_num(hpcost_ct) ) menu_additem(menu, menuText, "4") formatex( menuText, charsmax(menuText), "w+%d Armure - r[%d $]", get_pcvar_num(armor_ct), get_pcvar_num(armorcost_ct) ) menu_additem(menu, menuText, "5") formatex( menuText, charsmax(menuText), "wParachute - r[%d $]", get_pcvar_num(parachute_ct) ) menu_additem(menu, menuText, "6") formatex( menuText, charsmax(menuText), "wMitrailleuse - r[%d $]", get_pcvar_num(m249_ct) ) menu_additem(menu, menuText, "7") menu_setprop(menu, MPROP_EXITNAME, "Sortir") menu_setprop(menu, MPROP_EXIT, MEXIT_ALL) menu_display(id, menu) } else { menu = menu_create("Shop Menu [T]:", "menu_terro") formatex( menuText, charsmax(menuText), "wGrenade - r[%d $]", get_pcvar_num(grenade_t) ) menu_additem(menu, menuText, "1") formatex( menuText, charsmax(menuText), "wFlashbang - r[%d $]", get_pcvar_num(flash_t) ) menu_additem(menu, menuText, "2") formatex( menuText, charsmax(menuText), "wFrostNade - r[%d $]", get_pcvar_num(frost_t) ) menu_additem(menu, menuText, "3") formatex( menuText, charsmax(menuText), "w+%d HP - r[%d $]", get_pcvar_num(hp_t), get_pcvar_num(hpcost_t) ) menu_additem(menu, menuText, "4") formatex( menuText, charsmax(menuText), "w+%d Armure - r[%d $]", get_pcvar_num(armor_t), get_pcvar_num(armorcost_t) ) menu_additem(menu, menuText, "5") formatex( menuText, charsmax(menuText), "wAuto bunny - r[%d $]", get_pcvar_num(autobunny_t) ) menu_additem(menu, menuText, "6") formatex( menuText, charsmax(menuText), "wSuper Couteau - r[%d $]", get_pcvar_num(superknife_t) ) menu_additem(menu, menuText, "7") menu_setprop(menu, MPROP_EXITNAME, "Sortir") menu_setprop(menu, MPROP_EXIT, MEXIT_ALL) menu_display(id, menu) } } public menu_ct(id, menu, item) { if (item == MENU_EXIT) return PLUGIN_HANDLED // Obtenir l'info de l'item new info[3] new access, callback menu_item_getinfo(menu, item, access, info, 2, _, _, callback) new key = str_to_num(info) switch(key) { case 1: { if ( cs_get_user_team(id) == CS_TEAM_T ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu ne peux pas acheter un item des ct quand tu es terro !") return PLUGIN_HANDLED } if ( !is_user_alive(id) ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu ne peux rien acheter quand tu es ^x03mort ^x01!") return PLUGIN_HANDLED } if ( user_has_weapon(id, CSW_HEGRENADE) ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu as déjà cet item !") return PLUGIN_HANDLED } new user_money = cs_get_user_money(id) new grenade_count = get_pcvar_num(grenade_ct) if ( user_money < grenade_count ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu n'as ^x03pas assez d'argent ^x01pour acheter cet item !") return PLUGIN_HANDLED } else { cs_set_user_money(id, user_money - grenade_count) give_item(id, "weapon_hegrenade") print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu viens d'acheter une^x03 Grenade^x01 !") } } case 2: { if ( cs_get_user_team(id) == CS_TEAM_T ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu ne peux pas acheter un item des ct quand tu es terro !") return PLUGIN_HANDLED } if ( !is_user_alive(id) ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu ne peux rien acheter quand tu es ^x03mort ^x01!") return PLUGIN_HANDLED } if ( cs_get_user_nvg(id) ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu as déjà cet item !") return PLUGIN_HANDLED } new user_money = cs_get_user_money(id) new nightvision_count = get_pcvar_num(nightvision_ct) if ( user_money < nightvision_count ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu n'as ^x03pas assez d'argent ^x01pour acheter cet item !") return PLUGIN_HANDLED } else { cs_set_user_nvg(id, 1) cs_set_user_money(id, user_money - nightvision_count) print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu viens d'acheter une^x03 NightVision^x01 !") } } case 3: { if ( cs_get_user_team(id) == CS_TEAM_T ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu ne peux pas acheter un item des ct quand tu es terro !") return PLUGIN_HANDLED } if ( !is_user_alive(id) ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu ne peux rien acheter quand tu es ^x03mort ^x01!") return PLUGIN_HANDLED } if ( cs_get_user_defuse(id) ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu as déjà cet item !") return PLUGIN_HANDLED } new user_money = cs_get_user_money(id) new defuser_count = get_pcvar_num(defuser_ct) if ( user_money < defuser_count ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu n'as ^x03pas assez d'argent ^x01pour acheter cet item !") return PLUGIN_HANDLED } else { cs_set_user_money(id, user_money - defuser_count) cs_set_user_defuse(id, 1) print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu viens d'acheter un ^x03kit de désamorçage ^x01!") } } case 4: { if ( cs_get_user_team(id) == CS_TEAM_T ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu ne peux pas acheter un item des ct quand tu es terro !") return PLUGIN_HANDLED } if ( !is_user_alive(id) ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu ne peux rien acheter quand tu es ^x03mort ^x01! ") return PLUGIN_HANDLED } new user_money = cs_get_user_money(id) new hp_count = get_pcvar_num(hpcost_ct) if ( user_money < hp_count ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu n'as ^x03pas assez d'argent ^x01pour acheter cet item !") return PLUGIN_HANDLED } else { cs_set_user_money(id, user_money - hp_count) new hp_bonus = get_pcvar_num(hp_ct) set_user_health(id, get_user_health(id) + hp_bonus) print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu viens d'acheter^x03 %d HP^x01 !", hp_bonus) } } case 5: { if ( cs_get_user_team(id) == CS_TEAM_T ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu ne peux pas acheter un item des ct quand tu es terro !") return PLUGIN_HANDLED } if ( !is_user_alive(id) ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu ne peux rien acheter quand tu es ^x03mort ^x01!") return PLUGIN_HANDLED } new user_money = cs_get_user_money(id) new ap_count = get_pcvar_num(armorcost_ct) if ( user_money < ap_count ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu n'as ^x03pas assez d'argent ^x01pour acheter cet item !") return PLUGIN_HANDLED } else { cs_set_user_money(id, user_money - ap_count) new ap_bonus = get_pcvar_num(armor_ct) cs_set_user_armor(id, get_user_armor(id) + ap_bonus, CS_ARMOR_VESTHELM) print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu viens d'acheter^x03 %d d'Armure^x01 !", ap_bonus) } } case 6: { if ( cs_get_user_team(id) == CS_TEAM_T ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu ne peux pas acheter un item des ct quand tu es terro !") return PLUGIN_HANDLED } if ( !is_user_alive(id) ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu ne peux rien acheter quand tu es ^x03mort ^x01!") return PLUGIN_HANDLED } if ( g_HasParachute[id] ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu as déjà cet item !") return PLUGIN_HANDLED } new user_money = cs_get_user_money(id) new parachute_count = get_pcvar_num(parachute_ct) if ( user_money < parachute_count ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu n'as ^x03pas assez d'argent ^x01pour acheter cet item !") return PLUGIN_HANDLED } cs_set_user_money(id, user_money - parachute_count) g_HasParachute[id] = true new name[32] get_user_name(id, name, charsmax(name)) server_cmd("amx_parachute ^"%s^"", name) print_color(id, id, 0, "^x04[Furiens Shop] ^x01Tu viens d'acheter un ^x03 Parachute^x01 !") } case 7: { if ( cs_get_user_team(id) == CS_TEAM_T ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu ne peux pas acheter un item des ct quand tu es terro !") return PLUGIN_HANDLED } if ( !is_user_alive(id) ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu ne peux rien acheter quand tu es ^x03mort ^x01!") return PLUGIN_HANDLED } if ( user_has_weapon(id, CSW_M249) ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu as déjà cet item !") return PLUGIN_HANDLED } new user_money = cs_get_user_money(id) new m249_count = get_pcvar_num(m249_ct) if ( user_money < m249_count ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu n'as ^x03pas assez d'argent ^x01pour acheter cet item !") return PLUGIN_HANDLED } else { cs_set_user_money(id, user_money - m249_count) strip_user_weapons(id) give_item(id, "weapon_m249") cs_set_user_bpammo(id, CSW_M249, 250) give_item(id, "weapon_deagle") cs_set_user_bpammo(id, CSW_DEAGLE, 50) print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu viens d'acheter une^x03 m249 ^x01 !") } } } return PLUGIN_HANDLED } public menu_terro(id, menu, item) { if (item == MENU_EXIT) return PLUGIN_HANDLED // Obtenir l'info de l'item new info[3] new access, callback menu_item_getinfo(menu, item, access, info, 2, _, _, callback) new key = str_to_num(info) switch (key) { case 1: { if ( cs_get_user_team(id) == CS_TEAM_CT ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu ne peux pas acheter un item des terros quand tu es ct !") return PLUGIN_HANDLED } if ( !is_user_alive(id) ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu ne peux rien acheter quand tu es ^x03mort ^x01!") return PLUGIN_HANDLED } if ( user_has_weapon(id, CSW_HEGRENADE) ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu as déjà cet item ! ") return PLUGIN_HANDLED } new user_money = cs_get_user_money(id) new grenade_count = get_pcvar_num(grenade_t) if ( user_money < grenade_count ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu n'as ^x03pas assez d'argent ^x01pour acheter cet item !") return PLUGIN_HANDLED } else { cs_set_user_money(id, user_money - grenade_count) give_item(id, "weapon_hegrenade") print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu viens d'acheter une^x03 HE Grenade ^x01 !") } } case 2: { if ( cs_get_user_team(id) == CS_TEAM_CT ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu ne peux pas acheter un item des terros quand tu es ct !") return PLUGIN_HANDLED } if ( !is_user_alive(id) ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu ne peux rien acheter quand tu es ^x03mort ^x01!") return PLUGIN_HANDLED } if ( user_has_weapon(id, CSW_FLASHBANG) && cs_get_user_bpammo(id, CSW_FLASHBANG) == 2 ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu as déjà cet item !") return PLUGIN_HANDLED } new user_money = cs_get_user_money(id) new flash_count = get_pcvar_num(flash_t) if ( user_money < flash_count ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu n'as ^x03pas assez d'argent ^x01pour acheter cet item !") return PLUGIN_HANDLED } else { cs_set_user_money(id, user_money - flash_count) give_item(id, "weapon_flashbang") print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu viens d'acheter une^x03 Flash ^x01 !") } } case 3: { if ( cs_get_user_team(id) == CS_TEAM_CT ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu ne peux pas acheter un item des terros quand tu es ct !") return PLUGIN_HANDLED } if ( !is_user_alive(id) ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu ne peux rien acheter quand tu es ^x03mort ^x01!") return PLUGIN_HANDLED } if ( user_has_weapon(id, CSW_SMOKEGRENADE) ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu as déjà cet item !") return PLUGIN_HANDLED } new user_money = cs_get_user_money(id) new frost_count = get_pcvar_num(frost_t) if ( user_money < frost_count ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu n'as ^x03pas assez d'argent ^x01pour acheter cet item !") return PLUGIN_HANDLED } else { cs_set_user_money(id, user_money - frost_count) give_item(id, "weapon_smokegrenade") print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu viens d'acheter une^x03 FrostNade ^x01 !") } } case 4: { if ( cs_get_user_team(id) == CS_TEAM_CT ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu ne peux pas acheter un item des terros quand tu es ct !") return PLUGIN_HANDLED } if ( !is_user_alive(id) ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu ne peux rien acheter quand tu es ^x03mort ^x01!") return PLUGIN_HANDLED } new user_money = cs_get_user_money(id) new hp_count = get_pcvar_num(hpcost_t) if ( user_money < hp_count ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu n'as ^x03pas assez d'argent ^x01pour acheter cet item !") return PLUGIN_HANDLED } else { cs_set_user_money(id, user_money - hp_count) new hp_bonus = get_pcvar_num(hp_t) set_user_health(id, get_user_health(id) + hp_bonus) print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu viens d'acheter^x03 %d HP ^x01 !", hp_bonus) } } case 5: { if ( cs_get_user_team(id) == CS_TEAM_CT ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu ne peux pas acheter un item des terros quand tu es ct !") return PLUGIN_HANDLED } if ( !is_user_alive(id) ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu ne peux rien acheter quand tu es ^x03mort ^x01!") return PLUGIN_HANDLED } new user_money = cs_get_user_money(id) new ap_count = get_pcvar_num(armorcost_t) if ( user_money < ap_count ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu n'as ^x03pas assez d'argent ^x01pour acheter cet item !") return PLUGIN_HANDLED } else { cs_set_user_money(id, user_money - ap_count) new ap_bonus = get_pcvar_num(armor_t) cs_set_user_armor(id, get_user_armor(id) + ap_bonus, CS_ARMOR_VESTHELM) print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu viens d'acheter^x03 %d d'Armure ^x01 !", ap_bonus) } } case 6: { if ( cs_get_user_team(id) == CS_TEAM_CT ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu ne peux pas acheter un item des terros quand tu es ct !") return PLUGIN_HANDLED } if ( !is_user_alive(id) ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu ne peux rien acheter quand tu es ^x03mort ^x01!") return PLUGIN_HANDLED } if ( g_HasAutoBhop[id] ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu as déjà cet item !") return PLUGIN_HANDLED } new user_money = cs_get_user_money(id) new autobunny_count = get_pcvar_num(autobunny_t) if ( user_money < autobunny_count ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu n'as ^x03pas assez d'argent ^x01pour acheter cet item !") return PLUGIN_HANDLED } else { cs_set_user_money(id, user_money - autobunny_count) g_HasAutoBhop[id] = true print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu viens d'acheter un^x03 Auto Bunny ^x01 !") } } case 7: { if ( cs_get_user_team(id) == CS_TEAM_CT ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu ne peux pas acheter un item des terros quand tu es ct !") return PLUGIN_HANDLED } if ( !is_user_alive(id) ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu ne peux rien acheter quand tu es ^x03mort ^x01!") return PLUGIN_HANDLED } if ( g_HasSuperKnife[id] ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu as déjà cet item !") return PLUGIN_HANDLED } new user_money = cs_get_user_money(id) new superknife_count = get_pcvar_num(superknife_t) if ( user_money < superknife_count ) { print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu n'as ^x03pas assez d'argent ^x01pour acheter cet item !") return PLUGIN_HANDLED } else { cs_set_user_money(id, user_money - superknife_count) g_HasSuperKnife[id] = true if ( get_user_weapon(id) == CSW_KNIFE ) { set_pev(id, pev_viewmodel2, g_ModelSuperKnife) } print_color(id, id, 0, "^x04[Furiens Shop]^x01 Tu viens d'acheter un^x03 Super Couteau ^x01 !") } } } return PLUGIN_HANDLED } public ham_PlayerJump_Pre(id) { if ( g_HasAutoBhop[id] && is_user_alive(id) ) { if ( pev(id, pev_flags) & (FL_WATERJUMP | FL_ONGROUND) == FL_ONGROUND && pev(id, pev_waterlevel) < 2 ) { new iOldButtons = pev(id, pev_oldbuttons) if ( iOldButtons & IN_JUMP ) { set_pev(id, pev_oldbuttons, iOldButtons & ~IN_JUMP) } } } } public ham_TakeDamage_Pre(victim, inflictor, attacker, Float:damage, damage_bits) { if ( IsPlayer(attacker) && g_HasSuperKnife[attacker] && is_user_alive(attacker) && inflictor == attacker && get_user_weapon(attacker) == CSW_KNIFE ) { SetHamParamFloat( 4, damage * get_pcvar_float(knife_multiplier) ) } } public ham_PlayerSpawn_Post(id) { g_HasParachute[id] = false g_HasAutoBhop[id] = false g_HasSuperKnife[id] = false } public ham_ItemDeploy_Post(weapon_ent) { static owner owner = get_pdata_cbase(weapon_ent, 41, 4) if ( is_user_alive(owner) && g_HasSuperKnife[owner] ) { set_pev(owner, pev_viewmodel2, g_ModelSuperKnife) } } // Message colorés public print_color(id, cid, color, const message[], any:...) { new msg[192] vformat(msg, charsmax(msg), message, 5) /* if you want to use ML, enable replace_all(msg, charsmax(msg), "!g", "^x04") replace_all(msg, charsmax(msg), "!y", "^x01") replace_all(msg, charsmax(msg), "!t", "^x03") */ new param if (!cid) return else param = cid new team[32] get_user_team(param, team, 31) switch (color) { case 0: msg_teaminfo(param, team) case 1: msg_teaminfo(param, "TERRORIST") case 2: msg_teaminfo(param, "CT") case 3: msg_teaminfo(param, "SPECTATOR") } if (id) msg_saytext(id, param, msg) else msg_saytext(0, param, msg) if (color != 0) msg_teaminfo(param, team) } msg_saytext(id, cid, msg[]) { message_begin(id ? MSG_ONE : MSG_ALL, get_user_msgid("SayText"), _, id) write_byte(cid) write_string(msg) message_end() } msg_teaminfo(id, team[]) { message_begin(MSG_ONE, get_user_msgid("TeamInfo"), _, id) write_byte(id) write_string(team) message_end() }
Voila ce sont mes trois plugins principal.
|
|