[Include] IsPlayerInWater - 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: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (
https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] IsPlayerInWater (
/showthread.php?tid=400049)
IsPlayerInWater -
stabker - 16.12.2012
IsPlayerInWater
With this function, you can check whether the player in water. This function can be used for some of the anti-cheats or, for example, the RP servers. It checks not only at sea, but in other bodies of water, such as swimming pools, rivers, etc.
Example of use:
pawn Код:
switch(GetPlayerAnimationIndex(playerid))
{
case 1543,1538,1539:
{
if(!IsPlayerInWater(playerid)) SendClientMessage(playerid,-1,"You are cheater"), Kick(playerid);
}
}
Include:
pastebin
P.S. Sorry for my bad English