Can someone fix my Plugin?
i tried to make a ww2 plugin that change the player skin and weapon skin plz help
here is the code: #include <amxmodx> #include <engine> #include <cstrike> new PLUGIN[]="WW2" new AUTHOR[]="Enblad" new VERSION[]="1.0" public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) //Checks register_event("ResetHUD", "newSpawn","b") register_event("CurWeapon", "weaponChange","be","1=1") } //---------------------------------------------------------------------------------------------- public plugin_precache() { precache_model("models/v_shotgunns") precache_model("models/p_shotgunns") precache_model("models/player/soldier/Soldier.mdl") } //---------------------------------------------------------------------------------------------- public SoldierX_init() { giveGun(id) switchmodel(id) } //---------------------------------------------------------------------------------------------- public giveGun(id) { if ( is_user_alive(id) ) { give_item(id, "weapon_m4a1") } } //---------------------------------------------------------------------------------------------- public switchmodel(id) { new clip, ammo, wpnid = get_user_weapon(id,clip,ammo) if (wpnid == CSW_XM1014) { Entvars_Set_String(id, EV_SZ_viewmodel, "models/v_shotgunns") Entvars_Set_String(id, EV_SZ_weaponmodel, "models/p_shotgunns") } } //---------------------------------------------------------------------------------------------- public weaponChange(id) { new wpnid = read_data(2) new clip = read_data(3) if ( wpnid != CSW_XM1014 ) return switchmodel(id) if ( clip == 0 ) { ReloadAmmo(id) } } //---------------------------------------------------------------------------------------------- public changePlayer(id){ cs_set_user_model(id, "models/Soldier.mdl") } //---------------------------------------------------------------------------------------------- |
Re: Can someone fix my Plugin?
Functions newSpawn and ReloadAmmo do not exist.
SoldierX_init is never being called. |
Re: Can someone fix my Plugin?
#include <amxmodx>
#include <engine> #include <cstrike> new PLUGIN[]="WW2" new AUTHOR[]="Enblad" new VERSION[]="1.0" public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) //Checks register_event("ResetHUD", "newSpawn","b") register_event("CurWeapon", "weaponChange","be","1=1") } //---------------------------------------------------------------------------------------------- public plugin_precache() { precache_model("models/v_shotgunns") precache_model("models/p_shotgunns") precache_model("models/player/soldier/Soldier.mdl") } //---------------------------------------------------------------------------------------------- public init() { giveGun(id) switchmodel(id) } //---------------------------------------------------------------------------------------------- public giveGun(id) { if ( is_user_alive(id) ) { give_item(id, "weapon_m4a1") } } //---------------------------------------------------------------------------------------------- public switchmodel(id) { new clip, ammo, wpnid = get_user_weapon(id,clip,ammo) if (wpnid == CSW_XM1014) { Entvars_Set_String(id, EV_SZ_viewmodel, "models/v_shotgunns") Entvars_Set_String(id, EV_SZ_weaponmodel, "models/p_shotgunns") } } //---------------------------------------------------------------------------------------------- public weaponChange(id) { new wpnid = read_data(2) new clip = read_data(3) if ( wpnid != CSW_XM1014 ) return switchmodel(id) if ( clip == 0 ) { ReloadAmmo(id) } } //---------------------------------------------------------------------------------------------- public changePlayer(id){ cs_set_user_model(id, "models/Soldier.mdl") } //---------------------------------------------------------------------------------------------- i changed soldierx how should i do in newspawn and reloadammo? |
Re: Can someone fix my Plugin?
...
You changed SoldierX_init to init and now you think it is being called????? |
Re: Can someone fix my Plugin?
i dont know what to do i am a beginner
|
Re: Can someone fix my Plugin?
do you know whats the problem with my plugin?
#include <amxmodx> #include <engine> #include <cstrike> new PLUGIN[]="WW2" new AUTHOR[]="Enblad" new VERSION[]="1.0" public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) //Checks register_event("ResetHUD", "newSpawn","b") register_event("CurWeapon", "weaponChange","be","1=1") } //---------------------------------------------------------------------------------------------- public plugin_precache() { precache_model("models/v_shotgunns") precache_model("models/p_shotgunns") precache_model("models/player/soldier/Soldier.mdl") } //---------------------------------------------------------------------------------------------- public init() { giveGun(id) switchmodel(id) } //---------------------------------------------------------------------------------------------- public giveGun(id) { if ( is_user_alive(id) ) { give_item(id, "weapon_m4a1") } } //---------------------------------------------------------------------------------------------- public switchmodel(id) { new clip, ammo, wpnid = get_user_weapon(id,clip,ammo) if (wpnid == CSW_XM1014) { Entvars_Set_String(id, EV_SZ_viewmodel, "models/v_shotgunns") Entvars_Set_String(id, EV_SZ_weaponmodel, "models/p_shotgunns") } } //---------------------------------------------------------------------------------------------- public weaponChange(id) { new wpnid = read_data(2) new clip = read_data(3) if ( wpnid != CSW_XM1014 ) return switchmodel(id) if ( clip == 0 ) { ReloadAmmo(id) } } //---------------------------------------------------------------------------------------------- public changePlayer(id){ cs_set_user_model(id, "models/Soldier.mdl") } //---------------------------------------------------------------------------------------------- |
Re: Can someone fix my Plugin?
Okay...
Try this. It will change all Players Model and hopefully the Shotgun Model. Code:
|
Re: Can someone fix my Plugin?
cant you do that ct get one skin and t get an other skin
same with the weapon? |
Re: Can someone fix my Plugin?
Ironic how silencer has "Fakemeta GOOD, Engine BAD" in his sig yet gave you a script with engine in it. tsk tsk tsk. Practice what you preach I say.
Code:
|
Re: Can someone fix my Plugin?
i want it like this, you drop all you weapons without the shotgun and i want it to be diffrent weapon skins in each team and want the player skin. plz if you can do it tell me and when i have fake..... do i have to download it or something?
|
| All times are GMT -4. The time now is 04:55. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.