AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   change weapon model (https://forums.alliedmods.net/showthread.php?t=12464)

skp524 04-16-2005 12:50

change weapon model
 
I want any players in my server to use my new grenade and flashbang model (change their model to my model)and then i wrote a plugin for changing weapon model .Although they downloaded my models , the models can not be changed.
Anyone can teach me to set this plugin???

XxAvalanchexX 04-16-2005 12:58

Code:
#include <amxmodx> #include <engine> public plugin_precache() {    precache_model("models/skp/p_flashbang.mdl");    precache_model("models/skp/v_flashbang.mdl"); } public plugin_init() {    register_plugin("SKP's Flashbangs","0.10","Catwoman");    register_event("CurWeapon","event_curweapon","b"); } public event_curweapon(id) {    new clip, ammo, weapon = get_user_weapon(id,clip,ammo);    if(weapon == CSW_FLASHBANG) {       entity_set_string(id,EV_SZ_viewmodel,"models/skp/v_flashbang.mdl");       entity_set_string(id,EV_SZ_weaponmodel,"models/skp/p_flashbang.mdl");    } }

skp524 04-16-2005 13:01

THX~!!!!!!!!!!i am happy that someone can help me


All times are GMT -4. The time now is 09:50.

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