AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   models & Glow (https://forums.alliedmods.net/showthread.php?t=143389)

zombieplague 11-19-2010 03:13

models & Glow
 
help !! how to check if someone is using the model i have listed ?

like if someone is using the model that i listed something will happen.

SAS
JILL
BOXER

2nd question is how to check if a user glow is blue ?

Exolent[jNr] 11-19-2010 03:52

Re: models
 
Loop through all players and check their model names to those given names?

zombieplague 11-19-2010 06:17

Re: models
 
some codes please. i searched can't find similar.

meTaLiCroSS 11-19-2010 12:30

Re: models & Glow
 
Loop

cs_get_user_model

equal? LoL

SaM.ThE.MaN 11-19-2010 12:44

Re: models & Glow
 
its pretty easy ... , ... why do u need codes , loop ... easy to do that , cs_get_user_model ... common -.- , and the glow thing ... search for set_user_rendering ... it is best so search it in functions

meTaLiCroSS 11-19-2010 13:08

Re: models & Glow
 
Code:
new Float:vecGlowColors[3]     entity_get_vector(iId, EV_VEC_rendercolor, vecGlowColors)         if(xs_vec_equal(vecGlowColors, {0.0, 255.0, 0.0})     {         // Blue color as glow.     }

Exolent[jNr] 11-19-2010 16:37

Re: models & Glow
 
Quote:

Originally Posted by meTaLiCroSS (Post 1352481)
Code:
new Float:vecGlowColors[3]     entity_get_vector(iId, EV_VEC_rendercolor, vecGlowColors)         if(xs_vec_equal(vecGlowColors, {0.0, 255.0, 0.0})     {         // Blue color as glow.     }

1. You should tag it as Float.
2. Blue is 0,0,255 not 0,255,0.

Code:
new Float:vecGlowColors[3]     entity_get_vector(iId, EV_VEC_rendercolor, vecGlowColors)         if(xs_vec_equal(vecGlowColors, Float:{0.0, 0.0, 255.0})     {         // Blue color as glow.     }

zombieplague 11-19-2010 23:09

Re: models & Glow
 
Quote:

Originally Posted by SaM.ThE.MaN (Post 1352474)
its pretty easy ... , ... why do u need codes , loop ... easy to do that , cs_get_user_model ... common -.- , and the glow thing ... search for set_user_rendering ... it is best so search it in functions

i understand it pretty easy for you.

cs_get_user_model == SAS.mdl ?

and i asked for how to get the user glow not set them.

@Exolent so i have to use xs ?
@meta i will try.

Exolent[jNr] 11-20-2010 00:16

Re: models & Glow
 
Quote:

Originally Posted by zombieplague (Post 1352704)
i understand it pretty easy for you.

cs_get_user_model == SAS.mdl ?

and i asked for how to get the user glow not set them.

@Exolent so i have to use xs ?
@meta i will try.

cs_get_user_model() gives a string representation of the player's model.

You have to use equali() to compare the string.

Code:
new szModel[ 32 ]; cs_get_user_model( iPlayer, szModel, charsmax( szModel ) ); if( equal( szModel, "model name") ) {    // player has "model name" model }

You don't need xs to check that color.
It really just does this:
Code:
if( vecGlowColors[ 0 ] == 0.0 && vecGlowColors[ 1 ] == 0.0 && vecGlowColors[ 2 ] == 255.0 ) {     // blue glow }

zombieplague 11-20-2010 00:26

Re: models & Glow
 
Quote:

Originally Posted by Exolent[jNr] (Post 1352728)
cs_get_user_model() gives a string representation of the player's model.

You have to use equali() to compare the string.

Code:
new szModel[ 32 ];
cs_get_user_model( iPlayer, szModel, charsmax( szModel ) );

if( equal( szModel, "model name") ) { // player has "model name" model }



You don't need xs to check that color.
It really just does this:
Code:
if( vecGlowColors[ 0 ] == 0.0 && vecGlowColors[ 1 ] == 0.0 && vecGlowColors[ 2 ] == 255.0 ) { // blue glow }

so what if it has more than 1 model listed ? like SAS, JILL, BOXER ?

just put without the .mdl ?

another question if i have a model menu.

when someone chooses sas then how to make it next round then change into sas rather than changing to sas right away.


All times are GMT -4. The time now is 11:16.

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