AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Ok I am lost; fakemeta help (https://forums.alliedmods.net/showthread.php?t=56352)

mrpanda 06-12-2007 03:53

Ok I am lost; fakemeta help
 
so im trying to use fakemeta to set models which in my understanding is better than cs_set_user_model

the major problem occurs is that i do not know how to call on the user model

like
CT GIGN
i want the player who has gign to be replaced with a swat uniform

i know it goes something like

new ent = (code here)
engfunc(engfuncsetmodel(forget exact code), ent, "new model")

some help?

pRED* 06-12-2007 05:37

Re: Ok I am lost; fakemeta help
 
whats wrong with

engfunc(EngFunc_SetModel,id,"swat")

Not sure if swat is the model name you want.. But yeah thats all you need.
you don't need to create a new entity..

regalis 06-12-2007 06:44

Re: Ok I am lost; fakemeta help
 
AFAIK EngFunc_SetModel doesn't work with playermodels...correct?
I tried it with set_user_info(id, "model", "modelname").
Are there a better way without cstrike-module?

greetz regalis

_Master_ 06-12-2007 10:56

Re: Ok I am lost; fakemeta help
 
Use Set_Model but update the player KeyValue as well (key = "model").

kmal2t 06-12-2007 11:13

Re: Ok I am lost; fakemeta help
 
I don't even play CS but including <cstrike> and using it with cs_get_user_model and cs_set_user_model at round start has never created a problem for me other than corpses revert back to their original model as corpses. If there's a method (like the ones above?) that also keep the corpse as the changed model I'd like to know.

djmd378 06-12-2007 13:34

Re: Ok I am lost; fakemeta help
 
I have a feeling that this is for your zombie mod so....

Code:
#include <cstrike> #include <fakemeta> new MODEL[256], zombie_model public plugin_init() {     zombie_model = register_cvar("zs_model","zombieswarm")     register_forward(FM_ClientUserInfoChanged,"fw_info")     register_forward(FM_PlayerPostThink,"fw_postthink") } public fw_info(id,buffer) {     if (g_human[id])         return FMRES_IGNORED     if (g_zombie[id])         return FMRES_SUPERCEDE     return FMRES_IGNORED } public fw_postthink(id) {     if (!is_user_alive(id))         return FMRES_IGNORED     if (g_Zombie[id]) {         new szModel[33]         get_pcvar_string(zombie_model, MODEL, 255)         cs_get_user_model(id, szModel, 32)         if (containi(szModel, MODEL) !=-1 )             return FMRES_IGNORED         new info = engfunc(EngFunc_GetInfoKeyBuffer, id)         engfunc(EngFunc_SetClientKeyValue, id, info, "model", MODEL)         return FMRES_IGNORED     }     return FMRES_IGNORED }

mrpanda 06-12-2007 22:28

Re: Ok I am lost; fakemeta help
 
woot you're the best <3

mrpanda 06-13-2007 00:55

Re: Ok I am lost; fakemeta help
 
just had time to read the code...

it doesnt fix crap =(

djmd378 06-13-2007 01:27

Re: Ok I am lost; fakemeta help
 
It helps if you tell us what you are trying to fix...

mrpanda 06-16-2007 13:22

Re: Ok I am lost; fakemeta help
 
nvm its basically unfixable with a server size like mine T.T

im going to stick to my old way of doing it, ill see if it works or not


All times are GMT -4. The time now is 10:42.

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