SA-MP Forums Archive
Kick a player for pausing - 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: Kick a player for pausing (/showthread.php?tid=453856)



Kick a player for pausing - Kudoz - 26.07.2013

Hello! I've been looking once again for something that can kick a player who pauses while they're in virtual world 1. How can I do this? Would be nice if someone could explain it to me, so I can learn it


Re: Kick a player for pausing - TH3_R3D™ - 26.07.2013

you can use an external function ( https://sampforum.blast.hk/showthread.php?tid=245738 )

Example on it:

pawn Код:
public OnPlayerPause(playerid)//the external function
{
    if(GetPlayerVirtualWorld(playerid) == 1)//we are checking if the player in vw = (1)
    {//if he's pausing there
         Kick(playerid);//kick the player
         SendClientMessage(playerid, -1, "You're kicked for pausing ");//now stating him a reason for kicking him
    }
    return 1;
}



Re: Kick a player for pausing - Kudoz - 27.07.2013

Ah, thanks! Got it!