plugin improvement - anti name flood
1 Attachment(s)
I made this plugin because i didn't find one that suits my needs.
Functionality: -scans for name change & it increments the counter (ct) -when ct reaches 3 within 20s form the first change it displays a message -when ct reaches 4 within 20s from the first change it kicks the player Although it works, it seems that the print_chat message & the default game message "x changed name to y" appear with a small time delay on my machine. I would like to know if there are any performance changes that can be made. I'm still in the process of learning so i may induced some cpu intensive or inefficient code. Thank you. |
Re: plugin improvement - anti name flood
Bump! :|
So i made no mistakes? Nothing to improve? Just tell me and I'll move along :D |
Re: plugin improvement - anti name flood
Quote:
PHP Code:
|
Re: plugin improvement - anti name flood
@Speed!
PHP Code:
|
Re: plugin improvement - anti name flood
Code:
|
Re: plugin improvement - anti name flood
You can use get_pcvar_float(nft)
|
Re: plugin improvement - anti name flood
Whoa, I didn't know you can use 'goto' in Pawn. Ethier way, don't use tasks.
Code:
|
Re: plugin improvement - anti name flood
@Drak: I don't know why i didn't use a switch & nice job incrementing the counter in the switch condition :D
Thank you all. |
Re: plugin improvement - anti name flood
Oops, you might want to move "g_LastTime[id] = Time" AFTER the switch.
|
Re: plugin improvement - anti name flood
I might? I must :D, perhaps you might want to edit the post if somebody (inexperienced) wants to use this.
|
| All times are GMT -4. The time now is 01:38. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.