ammo/money for staying active
Can anyone make a plugin for when a player is active for 10 or more minutes they receive ammopacks or money. I couldn't find any off google or I'm bad at searching
|
Re: ammo/money for staying active
Is it every 10 minutes they get stuff, or only once at 10 minutes of being connected? Is being connected and on a team enough -- what if they are AFK?
|
Re: ammo/money for staying active
PHP Code:
|
Re: ammo/money for staying active
Here's what I use for my rank system, just change the natives inside. It works on mapchange and disconnect for less than 5 minutes.
Code:
#include <amxmodx> |
Re: ammo/money for staying active
Code:
|
Re: ammo/money for staying active
Thank you ocixcrom!!
|
Re: ammo/money for staying active
OcixCrom - You are using TrieGetString() without ever calling TrieSetString(), so the condition in client_authorized() will never be true. It looks like you formatted the string in client_disconnect() in preparation to use it, but forgot.
This comes down to preference, but you can avoid the conditional #if pre-processor directives at the top by just redefining using pre-processor: #define MAX_PLAYERS 32 #define MAX_NAME_LENGTH 32 #define MAX_AUTHID_LENGTH 64 |
Re: ammo/money for staying active
Oops, missed that one line. Fixed.
Not using #if will output warnings that a symbol was redefined so that's why I prefer doing it. |
Re: ammo/money for staying active
It doesn't for me when I re-define MAX_PLAYERS
|
Re: ammo/money for staying active
Could've sworn this was happening at one point.
Edit - https://forums.alliedmods.net/showthread.php?t=255771 Looks like MAX_PLAYERS was 33 in older builds so yeah, I don't need the other ones but I'd rather let this one stay to prevent warnings for people that still use such builds. |
All times are GMT -4. The time now is 17:08. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.