Raised This Month: $12 Target: $400
 3% 

[TUT-CS] Changing player models and lowering svc_bad


Post New Thread Reply   
 
Thread Tools Display Modes
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 09-04-2008 , 16:14   Re: [TUT-CS] Changing player models and lowering svc_bad
Reply With Quote #21

This time, he rewrote the tutorial, and still forgot about it.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
IneedHelp
Veteran Member
Join Date: Mar 2007
Location: Argentina
Old 09-04-2008 , 19:14   Re: [TUT-CS] Changing player models and lowering svc_bad
Reply With Quote #22

I understand the tut much better ^^ Thanks.
__________________
IneedHelp is offline
MeRcyLeZZ
Veteran Member
Join Date: Dec 2007
Old 09-05-2008 , 21:23   Re: [TUT-CS] Changing player models and lowering svc_bad
Reply With Quote #23

Quote:
Originally Posted by Exolent[jNr] View Post
Very nice! I didn't read the 2nd work around, only because I wasn't interested in that work around as I was the 1st.
However, I will point out that in the 1st, you forgot to declare g_has_custom_model as a boolean.
Well yeah I don't usually bother adding tags unless it really makes a difference, like "Float:" (is there any other?)...
__________________
MeRcyLeZZ is offline
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 09-05-2008 , 21:40   Re: [TUT-CS] Changing player models and lowering svc_bad
Reply With Quote #24

Quote:
Originally Posted by MeRcyLeZZ View Post
Well yeah I don't usually bother adding tags unless it really makes a difference, like "Float:" (is there any other?)...
Array,Handle,Rational(not used in AMXX). But in Pawn none of them makes a real diffence,since everything is a cell. If you override a floats tag using _:, then use a funcion like floatfract,for example,the outcome will be the same.
danielkza is offline
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 09-06-2008 , 05:39   Re: [TUT-CS] Changing player models and lowering svc_bad
Reply With Quote #25

Quote:
Originally Posted by MeRcyLeZZ
This last method consists on making the actual players invisible and having individual entities (which have your custom player models) to follow them and copy their movements. So even though it looks like it, you aren't actually changing player models at all and no SVC_BAD kicking should occur (credits go to Cheap_Suit for being the first one who came up with this AFAIK).
*cough* "CHICKENMOD" *cough*, this is how the module use to work

1 vital piece of information you missed from that as well, the player that is transformed can see this new model as well!

Taken from ChickenMod 1.0.5.1 module:
Code:
int AddToFullPack(struct entity_state_s *state, int e, edict_t *ent, edict_t *host,                   int hostflags, int player, unsigned char *pSet) {     if (!player && ent->v.euser4 == host) //don't send chicken to owner         RETURN_META_VALUE(MRES_SUPERCEDE, 0);     RETURN_META_VALUE(MRES_IGNORED, 0); }
Orangutanz is offline
MeRcyLeZZ
Veteran Member
Join Date: Dec 2007
Old 09-06-2008 , 17:23   Re: [TUT-CS] Changing player models and lowering svc_bad
Reply With Quote #26

Quote:
Originally Posted by Orangutanz
*cough* "CHICKENMOD" *cough*, this is how the module use to work
Sorry, I had no idea about that really. Will edit in a sec.
Quote:
Originally Posted by Orangutanz
1 vital piece of information you missed from that as well, the player that is transformed can see this new model as well!
Yeah I wasn't testing with a model big enough to notice that. Thanks a lot, will fix this as well.
__________________
MeRcyLeZZ is offline
mut2nt
Senior Member
Join Date: Oct 2006
Location: in HELL!
Old 10-02-2008 , 08:52   Re: [TUT-CS] Changing player models and lowering svc_bad
Reply With Quote #27

and if i want to add 2 models to be random, how can i add?
at 2 exemple !
__________________
Anyone who helps me +KARMA

Last edited by mut2nt; 10-02-2008 at 08:56.
mut2nt is offline
Send a message via Yahoo to mut2nt Send a message via Skype™ to mut2nt
MeRcyLeZZ
Veteran Member
Join Date: Dec 2007
Old 10-05-2008 , 23:42   Re: [TUT-CS] Changing player models and lowering svc_bad
Reply With Quote #28

Quote:
Originally Posted by mut2nt
and if i want to add 2 models to be random, how can i add?
Just make a code that picks one randomly and stores it into g_player_model[id]

In the example you would need to replace this line
Code:
        // Store our custom model in g_player_model[id]         copy(g_player_model[id], sizeof g_player_model[] - 1, ZOMBIE_MODEL)
with something like
Code:
        // Pick a random model and store it in g_player_model[id]     switch (random_num(1, 3))     {         case 1: copy(g_player_model[id], sizeof g_player_model[] - 1, "model1")         case 2: copy(g_player_model[id], sizeof g_player_model[] - 1, "model2")         case 3: copy(g_player_model[id], sizeof g_player_model[] - 1, "model3")     }
__________________
MeRcyLeZZ is offline
ble85
Junior Member
Join Date: May 2008
Old 10-07-2008 , 15:41   Re: [TUT-CS] Changing player models and lowering svc_bad
Reply With Quote #29

Maybe u can help me marcylezz since cheap_suite is on vacation.

Biohazard is using the #2 method with entities and it seems to be a problem.
I described problem in 2 posts:
http://forums.alliedmods.net/showpos...postcount=2764
http://forums.alliedmods.net/showpost.php?p=696484&postcount=2766
ble85 is offline
MeRcyLeZZ
Veteran Member
Join Date: Dec 2007
Old 10-09-2008 , 12:33   Re: [TUT-CS] Changing player models and lowering svc_bad
Reply With Quote #30

Quote:
Originally Posted by ble85
Maybe u can help me marcylezz since cheap_suite is on vacation.
Biohazard is using the #2 method with entities and it seems to be a problem.
It seems to be caused whenever the pev_aiment of an entity is set to follow a player. Apparently that model is shrank to match the player's size. No idea why or how to fix it.

----

On a different note: while I was testing I noticed models were automatically hidden for myself, even big ones, so this may no be completely necessary after all:
Quote:
Originally Posted by MeRcyLeZZ
3. If the model is big enough, its owner will be able to see part of it even though he shouldn't
Again, I'm not entirely sure.
__________________

Last edited by MeRcyLeZZ; 10-09-2008 at 22:27.
MeRcyLeZZ is offline
Reply


Thread Tools
Display Modes

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 11:05.


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