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.
__________________