[Advanced] AFK system

Started by MacTavish, Jul 24, 2015, 08:33 AM

Previous topic - Next topic

KAKAN

Nice update.
This would help the newbies very much.
Nice work. :)
oh no

KAKAN

Just 1 suggestion( not a bug )
Add the same thing to onScriptUnload()
Because if someone uses this, and he shut-downs the server when someone had been AFK after killing 100 of players.
Will that guy be able to save his/her stats? Nope.
oh no

MacTavish

Quote from: KAKAN on Oct 24, 2015, 06:29 AMJust 1 suggestion( not a bug )
Add the same thing to onScriptUnload()
Because if someone uses this, and he shut-downs the server when someone had been AFK after killing 100 of players.
Will that guy be able to save his/her stats? Nope.
I'll see about that but there are much things that you guys have to implement yourself such as checking nick before saving stats ( i believe that there are many servers those have timers that saves stats each 3 minutes) btw for onScriptUnload() you can create a loop that could change nick and save data of each player if it is possible

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

KAKAN

Simple, add this in the onScriptUnload()
function onScriptUnload(){
local I, player, mp = GetMaxPlayers();
for(I = 0; I < mp; ++I ){ // place it in first line
player = FindPlayer( I )
if (pAway.rawin(oldname[player.ID]))
{
player.Name = ""+oldname[player.ID]+"";
pAway.rawdelete( player.Name );
oldname[player.ID] = null;
}
}
//Your shitty codes here.

}
oh no

MacTavish

I already made this code last night but i lost internet :D

Updated

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

KAKAN

Nice work.
After getting back from my trip.
I'll test it and have a full bug test.
oh no