Right now your SetModel function won't effect the player you tell it to, it will effect the player calling the function. This is because, instead of grabbing the arguments passed and getting a user from it, you just use the id of the player who called it.
But, your model change won't work anyway. cs_set_user_model takes the name of the model, not the path. So, in this case, you would use the name "santa".
Here is how I would do it.
Code:
// we added level and cid, since they are also passed.
// we use these to figure out if they have access.
public SetModel(id,level,cid) {
// make sure they have access and that they put in arguments
if(!cmd_access(id,level,cid,2)) {
return PLUGIN_CONTINUE
}
// get the name they put in
new name[32]
read_argv(1,name,31)
// match the name to a player
new target = cmd_target(id,name,2) // flag 2 = allow yourself
// this player isn't here
if(!target) {
return PLUGIN_CONTINUE
}
// changed id (player calling function) to target (player targeted)
cs_set_user_model(target, "models/player/santa/santa.mdl")
set_user_health(target, 250)
set_user_armor(target, 500)
//set_user_rendering(target, kRenderFxNone, 0, 0, 0, kRenderNormal, percentage)
set_user_rendering(target, kRenderFxNone, 225, 0, 0, kRenderGlow, 100)
set_user_maxspeed(target, 640.0)
return PLUGIN_CONTINUE
}
Also, you don't need to return anything in plugin_init or plugin_precache.
__________________