Raised This Month: $ Target: $400
 0% 

[HELP] anti retry bug


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 09-25-2011 , 17:43   [HELP] anti retry bug
Reply With Quote #1

Hello, I have a plugin that when someone in retry, you have to wait 20 seconds to reconnect again. But when I wait 20 seconds and try to reconnect, for example looks like this: -1 -2 -3 -4 -5 and so forward! Anyone know any solution for this?

thanks

PHP Code:
#include <amxmodx>

new Trie:g_SteamIDg_NoReconnectTime;

public 
plugin_init()
{
register_plugin("PUG NoRetry""1.0.2""Joao Krames");

g_NoReconnectTime register_cvar("amx_noretry""0");
g_SteamID TrieCreate();
}

public 
plugin_end()
TrieDestroy(g_SteamID);

public 
client_authorized(Client)
{
new 
Float:NoReconnectTime get_pcvar_float(g_NoReconnectTime);

if (!
NoReconnectTime)
return;

new 
SteamID[32];
get_user_authid(ClientSteamID31);

if (!
TrieKeyExists(g_SteamIDSteamID))
return;

new 
Float:TimeReason[64];
TrieGetCell(g_SteamIDSteamIDTime);

Time NoReconnectTime - (get_gametime() - Time);
formatex(Reason63"Sem retry. Aguarde %d para reconectar-se."floatround(Time));

Disconnect(ClientReason);
set_task(NoReconnectTime"RemoveSteamID"_SteamID32);
}

public 
client_disconnect(Client)
{
new 
SteamID[32];
get_user_authid(ClientSteamID31);
TrieSetCell(g_SteamIDSteamIDget_gametime());
}

public 
RemoveSteamID(SteamID[32])
TrieDeleteKey(g_SteamIDSteamID);

stock Disconnect(const Client, const Reason[] = "")
{
message_begin(MSG_ONESVC_DISCONNECT_Client);
write_string(Reason);
message_end();

__________________
kramesa is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:38.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode