AlliedModders

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

NomadCF 10-31-2006 13:10

Users Class - TFC
 
Is there a way to get a user class in TFC, I see there are for the other mods but not TFC.

Silencer123 10-31-2006 14:11

Re: Users Class - TFC
 
Experimentalize, improvise, and try out some Things that come to your Mind.
(Or use the Search Function) For example, I would start trying with this:
Code:
new classname[32];pev(id,pev_classname,classname,31) client_print(id,print_chat,"Your Classname: %s",classname)
I actually do not know how to find out a Players Class, but I would just try some Stuff.
Or how about get_user_weapons and look if the Player owns a Class specific Weapon.
(Can Weapons be dropped in TFC? If not, you could do it like that.)
Code:
new weapons[32],num;get_user_weapons(id,weapons,num) for(new i=0;i<num;i++) {     switch(weapons[i])     {         case 1:class[id]="X"         case 2:class[id]="Y"         case 3:class[id]="Z"     } }
If you do not know every Weapons Weapon ID use this to find out all Weapons IDs:
Code:
for(new i=1;i<30;i++) {     new weapon[32]     get_weaponname(i,weapon,31)     console_print(id,"Weapon Name: %s   ID: %i",weapon,i) }

NomadCF 10-31-2006 14:13

Re: Users Class - TFC
 
Thank I think This : new class = entity_get_int(Player[id], EV_INT_playerclass) return class will work..

Silencer123 10-31-2006 14:24

Re: Users Class - TFC
 
No Problem.
;)


All times are GMT -4. The time now is 04:48.

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