Raised This Month: $ Target: $400
 0% 

REPLACE MODEL HELP


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
angel killer
Senior Member
Join Date: Oct 2005
Location: Califronia
Old 11-23-2005 , 00:55   REPLACE MODEL HELP
Reply With Quote #1

ok so i was working on this plugin to replace weapons in my server and i got the models to precache but in game were the modle should be there is nothing here is the code

Quote:
Weapon Constants:

CSW_P228
CSW_SCOUT
CSW_HEGRENADE
CSW_XM1014
CSW_C4
CSW_MAC10
CSW_AUG
CSW_SMOKEGRENADE
CSW_ELITE
CSW_FIVESEVEN
CSW_UMP45
CSW_SG550
CSW_GALI
CSW_GALIL
CSW_FAMAS
CSW_USP
CSW_GLOCK18
CSW_AWP
CSW_MP5NAVY
CSW_M249
CSW_M3
CSW_M4A1
CSW_TMP
CSW_G3SG1
CSW_FLASHBANG
CSW_DEAGLE
CSW_SG552
CSW_AK47
CSW_KNIFE
CSW_P90
*/

#include <amxmodx>
#include <amxmisc>
#include <engine>

public plugin_init()
{
register_plugin("Gun Replacement","1.0","Lord Saddler/Angel killer");
register_event("CurWeapon","handle_gun","be", "1=1");
}

public handle_gun(id)
{
if(!is_user_alive(id))
{
return 0
}

new clip, ammo
new weap = get_user_weapon(id,clip,ammo)
if(weap == CSW_DEAGLE)//<--- Replace with a different weapon constant to replace another weapon
{
entity_set_model (id, EV_SZ_viewmodel, "models/p_shield_deagle_2.mdl")//<--- Change the model name for different weapons
entity_set_model (id, EV_SZ_weaponmodel, "models/v_shield_deagle_2.mdl")//<--- Change the model name for different weapons
}

return 0
}


public plugin_precache()
{
precache_model("models/p_shield_deagle_2.mdl");
precache_model("models/v_shield_deagle_2.mdl");
}
angel killer is offline
Send a message via AIM to angel killer
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:02.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode