JailBreak packets
PHP Code:
By the way, one more question from same plugin. If i want that for players with T flag would be given 2x more JB Packs this is the best way to do it or is there more optimised or something? PHP Code:
|
Re: JailBreak packets
The first part won't work because Round_End doesn't pass any arguments; you need to loop through the alive players using get_players.
For the second part, cache get_user_flags( attacker ) and get_pcvar_num( g_killhsjp ) at the beginning of the function so you don't need to call the natives as much as you do. |
Re: JailBreak packets
You mean like this?
PHP Code:
|
Re: JailBreak packets
PHP Code:
PHP Code:
Remove is_user_alive check from the loop, it's useless as you're already looping only through alive players (flag "a") Remove cs_get_user_team check and add flag "e" to get_players, then add an extra parameter "CT": PHP Code:
For the second part; Code:
You could also change this: Code:
Code:
Same for the second if/else. |
Re: JailBreak packets
Im not sure if your given code for second part is a corrert, becouse for killing CT it gives 3 JB packts (just an e.g.) and for doing it with HS it gives just +1, so in sum it will be 4 jb packets. And if look in your code for killing a ct it gives 3 packets and if you do it with HS it also gives 3 packets, so in sum it will be 6 packets.
Now, one more question, i would like to print for player how many packets he gets, so is there any better way than this? PHP Code:
|
| All times are GMT -4. The time now is 15:22. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.