AlliedModders

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

Sneakpeek 04-30-2006 14:48

[deleted]
 
[deleted]

KoST 04-30-2006 14:57

there is an error:

change:
Code:
for(i = 0; i <= num; i++)
to:
Code:
for(i = 0; i < num; i++)

if you have for example num=3 then you would go from 0 to 3 which are actually 4!!

[edit] i would also recommend to put:
Code:
            new team[2]             team[0] = get_user_team(id)
outside of the for loop...

and to replace the get_user_team by get_team function:
Code:
public get_team(id){     new team[2]     get_user_team(id,team,1)     switch(team[0]){         case 'T':{             return 1         }         case 'C':{             return 2         }         case 'S':{             return 3         }         default:{}     }     return 0 }

Sneakpeek 04-30-2006 16:29

Didn't work. =/
Still nothing happends if im close to an enemy.
Thanks for the help thought.
Any other ideas?

Didn't edit the team code, but that shouldnt have anything to do with it.

KoST 04-30-2006 16:42

can you attach your whole plugin? you could also pm it to me, i won't steal it :wink:

Sneakpeek 04-30-2006 16:47

I'll PM it...
Lots of small tards on the superhero mod forum who would do anything to rip off someone elses code.

v3x 04-30-2006 18:05

It's client_PreThink, not client_preThink.

VEN 05-02-2006 15:36

KoST: you probably forgot that get_team useful only for dead players or if you are not sure whether player alive or dead.

EDIT:

In most cases for the dead players who changed the team or for thoose who died due to team switch some of the team information updated only after hud reset. Thats why it's recommended use such stocks for dead players. When you sure that player is alive there is no need in such stocks. You also can use cs_get_user_team without any fear because it retieves team index directly from the player's offset.


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

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