RSSy MYGO.pl Opublikowano Listopad 28, 2020 o 01:04 RSSy Udostępnij Opublikowano Listopad 28, 2020 o 01:04 Hi, I have this plugin and as u can see it gives u a deagle with more damage for 16000 credits. But it has no model, and I want to add one. Only v_model. Could someone please add the model? PHP Code: #include <amxmodx> #include <cstrike> #include <fun> #include <hamsandwich> #define DEAGLE_COST 16000 #define IsPlayer(%0) ( 1 <= %0 <= MaxPlayers ) native fcs_get_user_credits ( Index ); native fcs_set_user_credits ( Index, Amount ); const SECONDARY_WEAPONS_BIT_SUM = (1<<CSW_P228)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_DEAGLE) new bool: HasDeagle [33], MaxPlayers; public plugin_init ( ) { RegisterHam ( Ham_Spawn, "player", "HamPlayerSpawnPost", 1 ); RegisterHam ( Ham_TakeDamage, "player", "HamPlayerTakeDamage" ); register_clcmd ( "say /deagle", "ClCmdDeagle", -1 ); MaxPlayers = get_maxplayers ( ); } public client_putinserver ( id ) HasDeagle [id] = false; public ClCmdDeagle ( id ) { if ( cs_get_user_team ( id ) != CS_TEAM_CT ) { client_print ( id, print_chat, "U have to be CT" ); return PLUGIN_HANDLED; } if ( fcs_get_user_credits ( id ) < DEAGLE_COST ) { client_print ( id, print_chat, "Not enough credits. U need %d more.", DEAGLE_COST - fcs_get_user_credits ( id ) ); return PLUGIN_HANDLED; } if ( HasDeagle [id] ) { client_print ( id, print_chat, "U used this already!" ); return PLUGIN_HANDLED; } DropSecondary ( id ); fcs_set_user_credits ( id, fcs_get_user_credits ( id ) - DEAGLE_COST ); give_item ( id, "weapon_deagle" ); cs_set_user_bpammo ( id, CSW_DEAGLE, 30 ); HasDeagle [id] = true; return PLUGIN_HANDLED; } public HamPlayerSpawnPost ( id ) { if ( is_user_alive ( id ) ) { HasDeagle [id] = false; } } public HamPlayerTakeDamage ( Victim, Inflictor, Attacker, Float: Damage ) { if ( Inflictor == Attacker && IsPlayer ( Attacker ) && get_user_weapon ( Attacker ) == CSW_DEAGLE && HasDeagle [Attacker] && cs_get_user_team ( Attacker ) == CS_TEAM_CT ) { SetHamParamFloat ( 4, Damage * 3.0 ); return HAM_HANDLED; } return HAM_IGNORED; } stock DropSecondary ( id ) { static Weapons [32], Num, i, WeaponID; Num = 0; get_user_weapons ( id, Weapons, Num ); for ( i = 0; i < Num; i ++ ) { WeaponID = Weapons [ i ] ; if ( 1 << WeaponID & SECONDARY_WEAPONS_BIT_SUM ) { static WName [32]; get_weaponname ( WeaponID, WName, charsmax ( WName ) ); engclient_cmd ( id, "drop", WName ); } } return 1; } Przeczytaj cały wpis Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi