Raised This Month: $ Target: $400
 0% 

errors


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
godlike
Senior Member
Join Date: Apr 2005
Old 12-18-2006 , 08:31   errors
Reply With Quote #1

hej its me again , i made this plugin but theres a compile error and i dont know what i means .Can someone help me plz. thank anyway.

Code:
/* Christmass mod by gl

	* beta versions by Matte but didnt work 
	* My Versions :
		* 0.1 Change the gun model (works)
		* 0.2 Change the playermodel
*/

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

new Player_Model[] = "models/santa_p_m249.mdl"
new View_Model[] = "models/santa_v_m249.mdl"
new Model[] = "models/christmas_santa.mdl"



#define PLUGIN "Christmas_Mod"
#define VERSION "0.2"
#define AUTHOR "GodLike"


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	// Add your code here...
	register_cvar("amx_christmas","1")
	register_event("CurWeapon", "Event_CurWeapon", "be","1=1" , "2=20")
	register_forward(FM_SetModel, "fw_SetModel")
	register_event("ResetHUD","changemodel","b")
}

public plugin_precache() 
{    
    precache_model(Player_Model)     
    precache_model(View_Model) 
    precache_model(Model)
    
} 

public Event_CurWeapon(id) 
{     
    new weaponID = read_data(2) 

    if(weaponID != CSW_M249)
        return PLUGIN_CONTINUE

    set_pev(id, pev_viewmodel2, View_Model)
    set_pev(id, pev_weaponmodel2, Player_Model)
    
    return PLUGIN_CONTINUE 
}

public client_connect(id)
{
	
	if(!get_cvar_num("amx_christmas")) return PLUGIN_CONTINUE
	
	set_task(10.0,"changemodel",id)

	return PLUGIN_HANDLED
}

public changemodel(id)
{
	
        cs_set_user_model(id ,Model[])
}
__________________
Read the rules before posting something stupid: click here

Any questions about amxx PM me

Last edited by godlike; 12-18-2006 at 09:51.
godlike is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 12-18-2006 , 08:55   Re: undefined symbol "cs_set_user_model"
Reply With Quote #2

#include <cstrike>
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
godlike
Senior Member
Join Date: Apr 2005
Old 12-18-2006 , 08:56   Re: undefined symbol "cs_set_user_model"
Reply With Quote #3

haha funny how did i forget that? thanks again.
__________________
Read the rules before posting something stupid: click here

Any questions about amxx PM me
godlike is offline
godlike
Senior Member
Join Date: Apr 2005
Old 12-18-2006 , 09:51   Re: undefined symbol "cs_set_user_model"
Reply With Quote #4

hmmm i modified it and then recompiled it but i get another error :
/home/groups/amxmodx/tmp3/phpzV7Xok.sma(74) : error 029: invalid expression, assumed zero

this my code :
Code:
/* Christmass mod by gl

	* beta versions by Matte but didnt work 
	* My Versions :
		* 0.1 Change the gun model (works)
		* 0.2 Change the playermodel
		
	*Credits :
			- MaTeo10 ( origenal script )
			- Jim_yang ( helped with some code)
			- Geesu ( for his toturial )
*/

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <cstrike>

new Player_Model[] = "models/santa_p_m249.mdl"
new View_Model[] = "models/santa_v_m249.mdl"
new Santa[] = "models/christmas_santa.mdl"



#define PLUGIN "Christmas_Mod"
#define VERSION "0.2"
#define AUTHOR "GodLike"


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	// Add your code here...
	register_cvar("amx_christmas","1")
	register_event("CurWeapon", "Event_CurWeapon", "be","1=1" , "2=20")
	register_forward(FM_SetModel, "fw_SetModel")
	register_event("ResetHUD","changemodel","b")
}

public plugin_precache() 
{    
    precache_model(Player_Model)     
    precache_model(View_Model) 
    precache_model(Santa)
    
} 

public Event_CurWeapon(id) 
{     
    new weaponID = read_data(2) 

    if(weaponID != CSW_M249)
        return PLUGIN_CONTINUE

    set_pev(id, pev_viewmodel2, View_Model)
    set_pev(id, pev_weaponmodel2, Player_Model)
    
    return PLUGIN_CONTINUE 
}

public client_connect(id)
{
	
	if(!get_cvar_num("amx_christmas")) return PLUGIN_CONTINUE
	
	set_task(10.0,"changemodel",id)

	return PLUGIN_HANDLED
}

public changemodel(id)
{
	
        cs_set_user_model(id,(Santa[]))
}
im trying to learn amx scripting so im a noob i really need some help.
__________________
Read the rules before posting something stupid: click here

Any questions about amxx PM me
godlike is offline
dutchmeat
Senior Member
Join Date: Sep 2006
Old 12-18-2006 , 10:19   Re: errors
Reply With Quote #5

Code:
cs_set_user_model(id,(Santa[]))
should be:

Code:
cs_set_user_model(id,Santa[])
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 12-18-2006 , 10:46   Re: errors
Reply With Quote #6

Code:
new weaponID = read_data(2) 
if(weaponID != CSW_M249)
    return PLUGIN_CONTINUE
this is redundant, because ("CurWeapon", "", "1=1","2=20")

and this too
Code:
if(!get_cvar_num("amx_christmas")) return PLUGIN_CONTINUE
set_task(10.0,"changemodel",id)
because you set the model in event ResetHud.
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang 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 08:01.


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