SA-MP Forums Archive
Auto Kick - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Auto Kick (/showthread.php?tid=437347)



Auto Kick - Latisha - 15.05.2013

I wanna create an auto kick if someone afk

pawn Код:
GetPlayerPos(i, NewPos[i][0], NewPos[i][1], NewPos[i][2]);
            if(IsPlayerInRangeOfPoint(i, 3, OldPos[i][0], OldPos[i][1], OldPos[i][2])) {AFK[i] ++;} else {AFK[i] = 0;}
            GetPlayerPos(i, OldPos[i][0], OldPos[i][1], OldPos[i][2]);
            if(AFK[i] >= 600)
            {
                if(!IsAFK[i])
                {
                    IsAFK[i] = 1;
                    SendClientMessage(i, COLOR_LIGHTBLUE, " You have been standing in the same area for 10 minutes, you have been kicked from the server.");
                    LoopingAnim(i,"BEACH", "ParkSit_M_loop", 4.0,1,0,0,0,0);
                    //AFKText[i] = CreateDynamic3DTextLabel("AFK", COLOR_CYAN, 0, 0, -20, 25, i);
                    //Streamer_SetFloatData(STREAMER_TYPE_3D_TEXT_LABEL,AFKText[i] , E_STREAMER_ATTACH_OFFSET_Z, 0.35);
                    Kick(playerid);
                }
            }
but,
Код:
error 017: undefined symbol "playerid"
How to fix that?


AW: Auto Kick - HurtLocker - 15.05.2013

Kick(i);


Re: Auto Kick - Latisha - 15.05.2013

Thanks man, Problem solved