[FilterScript] AFK System
#1

Hey all! I made my own AFK system for my server and i decided to post it for people that need it. I know it's not the best script. Here is why: it's my first filterscript EVER, so i'm still learning functions and callbacks. Also, i'm all new to the pawno language so if i want to do any updates i need some time to do it. Please also do not tell me how to learn pawno, i would like to learn it myself . Please dont be rude about my scripting , im still practicing
Heres the script:

AMX: http://solidfiles.com/d/7e28d/
PWN: http://solidfiles.com/d/b8bd/

Thanks!

P.S. Some rep would be really appreciated, i would like to make an advertisement for my server!
Reply
#2

pawn Code:
new Float:x, Float:y, Float:z;
...
GetPlayerPos(playerid, x,y,z);
...
SetPlayerPos(playerid, x,y,z);
if some players go to afk, they will be teleported to the last player's oldposition when they come back.

Use this:
pawn Code:
new Float:positions[MAX_PLAYERS][3];
...
GetPlayerPos(playerid, positions[playerid][0], positions[playerid][1], positions[playerid][2]);
...
SetPlayerPos(playerid, positions[playerid][0], positions[playerid][1], positions[playerid][2]);
Reply
#3

Do you mean they get teleported back where they were?
Reply
#4

no. I mean you store the x,y,z coordinates only for the last player (because Float, Float:y, Float:z gets updated with the last user who goes afk), and not for every player separated.
Reply
#5

ooo, i get it. Thanks i will update it.
EDIT: updated.
Reply
#6

nice gedaan dahley XD
ik vote ff je doe je ook ff bij mij? XD ik wil advertisen XD
ow en ik gebruik je af system XD
niels
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)