Flag Problems?[SOLVED]
I need some help . This code works sorta . I get run time errors. It finds the bomb perfectly. But for some reason it executes my code on CT's , but in reverse of the T's. for instance , it shows the essage to CT's get within 1000 units of the bomb. but T's it works for , but it doesnt do any of the punishments. I cant figure out if its my flags or the functions .
Code:
|
Re: Flag Problems?
You can't really compare your players like that. I'd do what VEN suggested in another one of your threads:
Code:
This grabs the origin of the C4 entity, and then gets all of the alive non-bot terrorists. Note that the correct team name flag to get the terrorist team is "TERRORIST" (counter-terrorists are "CT" and spectators are "SPECTATOR"). CS_TEAM_T and CS_TEAM_CT are used for the cs_get/set_user_team natives. Then it goes through all of those terrorists we grabbed, and gets their origin. It sees if they are too far away, and if so calls the punish function. |
Re: Flag Problems?
im getting some errors now
Code:
Error: Undefined symbol "punish_mode" on line 97Code:
|
Re: Flag Problems?
Then fix them.
If you don't know what the errors is then search... it's pretty logical errors... |
Re: Flag Problems?
Code:
...? |
Re: Flag Problems?
can some one tell me why its not punishing me ? what is wrong with my flags here ? it displays the message but then in doesnt punish me slap me or anything. how do i use read_flags properly?
Code:
please and thank you :| |
Re: Flag Problems?
Using read_flags, "a" becomes 1, "b" becomes 2, "c" becomes 4, "d" becomes 8, etcetera, etcetera. So, this is what I would do:
Code:
Then you can combine multiple letters and have it perform multiple punishments. |
Re: Flag Problems?
oh ok. Can you tell my why & ? i thought a single & was a bitwise operator ? or is that only in C?
|
Re: Flag Problems?
Yes, it is a bitwise operator. (1<<0) equals 1, (1<<1) equals 2, (1<<2) equals 4, etcetera. You can use those instead of standard integers if you'd like, the result will be the same.
|
Re: Flag Problems?
thanks i got it working perfectly now . thanks for all thehelp av +karma:up:
|
| All times are GMT -4. The time now is 07:01. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.