Allowing a command one a map for each player
Hello, Is there a way to count how many times a user used a command in the current map so I can limit how many times he can use it?
The problam is that I don't see pawn using hashs, and I don't really want to use the vault. |
Re: Allowing a command one a map for each player
Okay Explain more please. What type of command ect.. Like FullUpdate? Or what? Hashes meaning MD5?
|
Re: Allowing a command one a map for each player
you can do somin like this... but i dont know what command you want it for so i cant help on that part but this will be a counter and if the counter reaches the limit the code will no longer execute
Code:
new count[32] = 0 |
Re: Allowing a command one a map for each player
10x, But thats what I already did, How can it work if its based on a index of a player? which can be from 1 to 32.
Now lets say 32 people in the server will use the command <limit> times and leave the server, each item (1-32) in the array will be equal to <limit> denying the command from that id. Then another 32 people diffrent people (could also be 1..) will join the server, they wouldnt be able to use the command. Maybe I miss understood how the id value is generated, 10x ahead. |
Re: Allowing a command one a map for each player
id is based on the player index, not their #userid. But, try adding this into that code
PHP Code:
|
Re: Allowing a command one a map for each player
10x, But that code won't work for me, I don't want them to override the limit if they rejoin the server...
|
Re: Allowing a command one a map for each player
Lol gonna be hard then dude.
Read up on vault saving by steam id and reseting the vault on map change.. |
Re: Allowing a command one a map for each player
Ill try to find something without the vault :|
Maybe save Uid ina string or something.. |
Re: Allowing a command one a map for each player
i havent tested this but maybe this would work
Code:
new leavecount,leaveid[32] |
Re: Allowing a command one a map for each player
That would only work If a player retryed straight away.
If they were to disconnect and then come back later it wouldn't work. You could do the exact same thing but using an array of saved steam id (not sure how many you'd need.. 20..) When they leave overwrite a blank spot in the array or the oldest steam id. On connect search to see if the steam id is in the array... |
| All times are GMT -4. The time now is 06:42. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.