17.05.2016, 14:59
Use SetPVarString to temporarily store the player's name before setting the tag when they go AFK.
Something like:
Under your AFK code
And under /stopafk command
It's better if you use global arrays but PVar is easier to use so.
Something like:
Under your AFK code
PHP код:
SetPVarString(playerid, "AFKName", Name);
PHP код:
new name[24];
GetPVarString(playerid, "AFKName", name, sizeof(name));
SetPlayerName(playerid, name);
DeletePVar(playerid, "AFKName");