AlliedModders

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

John6000 11-26-2006 07:50

Help
 
How do I get a varible from a player and put it into an if statement ?

I want to get the varible model from the client and change it to another model accordingly.

For example:

if model = oneill
then amx_exec <player name> model xmasoneil

But I dont know how to do if's either :S

and i want it to check the models every 5 seconds ;D

Thanks!
John

The Specialist 11-26-2006 09:19

Re: Help
 
if you look at the paramters of the cs_get_user_model, the paramters are index , model , length. you need an array to hold the model.
Code:
  new model[8]; cs_get_user_model(id,model,7);
here are the models it returns

Code:

Model Constants:
enum CsInternalModel {        CS_DONTCHANGE = 0,        CS_CT_URBAN = 1,        CS_T_TERROR = 2,        CS_T_LEET = 3,        CS_T_ARCTIC = 4,        CS_CT_GSG9 = 5,        CS_CT_GIGN = 6,        CS_CT_SAS = 7,        CS_T_GUERILLA = 8,        CS_CT_VIP = 9};



All times are GMT -4. The time now is 07:00.

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