Raised This Month: $ Target: $400
 0% 

Knife Model Script Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Rolnaaba
Veteran Member
Join Date: May 2006
Old 07-24-2007 , 20:03   Re: Knife Model Script Help
Reply With Quote #1

try this:
Code:
#include <amxmodx> #include <fakemeta> public plugin_init() {       register_plugin( "eGKnife" ,"1.0", "incRo");         register_event("CurWeapon","event_curweapon","b"); }   public plugin_precache() {         precache_model("models/custom/egknife.mdl") } public event_curweapon(id) {     new wpnid = read_data(2);         if(wpnid == CSW_KNIFE) {         set_pev(id, pev_viewmodel, engfunc(EngFunc_AllocString, "models/custom/egknife.mdl"));     }   }
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
oreo824
Junior Member
Join Date: Jul 2006
Location: California
Old 07-25-2007 , 00:37   Re: Knife Model Script Help
Reply With Quote #2

It doesent work
__________________
Yeah that plugin..
oreo824 is offline
stupok
Veteran Member
Join Date: Feb 2006
Old 07-25-2007 , 00:57   Re: Knife Model Script Help
Reply With Quote #3

I tested this with the c4 model and it worked, so I hope it will do the job for you too:

Code:
#include <amxmodx> #include <fakemeta> public plugin_init() {       register_plugin( "eGKnife" ,"1.0", "incRo")         register_event("CurWeapon","event_curweapon","b","1=1","2=29") //CSW_KNIFE = 29 } public plugin_precache() {         precache_model("models/custom/egknife.mdl") } public event_curweapon(id) {     set_pev(id, pev_viewmodel, engfunc(EngFunc_AllocString, "models/custom/egknife.mdl")) }
stupok is offline
oreo824
Junior Member
Join Date: Jul 2006
Location: California
Old 07-25-2007 , 14:18   Re: Knife Model Script Help
Reply With Quote #4

It wont load correctly, it loads as "unknown" and when i restart the server the server doesent come up anymore unless i take it off.

Heres what i got:

Code:
#include <amxmodx>
#include <fakemeta>

public plugin_init()
{   
    register_plugin( "eGKnife" ,"1.0", "incRo")
    
    register_event("CurWeapon","event_curweapon","b","1=1","2=29") //CSW_KNIFE = 29
}

public plugin_precache()
{    
    precache_model("models/custom/v_knife.mdl")
}

public event_curweapon(id)
{
    set_pev(id, pev_viewmodel, engfunc(EngFunc_AllocString, "models/custom/v_knife.mdl"))
}
__________________
Yeah that plugin..
oreo824 is offline
stupok
Veteran Member
Join Date: Feb 2006
Old 07-25-2007 , 14:38   Re: Knife Model Script Help
Reply With Quote #5

Copy and paste the code you have into an .sma file

Move the .sma file to amxmodx/scripting

Move the .sma file onto compile.exe

Go to amxmodx/scripting/compiled

Move the .amxx file to amxmodx/plugins

Open amxmodx/configs/plugins.ini and add the name of the amxx file
stupok is offline
oreo824
Junior Member
Join Date: Jul 2006
Location: California
Old 07-26-2007 , 14:48   Re: Knife Model Script Help
Reply With Quote #6

I did exactly what you told me to do,
still shows up as unknown please help
__________________
Yeah that plugin..
oreo824 is offline
Reply



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 21:25.


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