detect player in water - 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: detect player in water (
/showthread.php?tid=650091)
detect player in water -
DeMoo - 20.02.2018
hi, i want detect player in any water i using this code in OnPlayerUpdate
PHP код:
new Float: PosX, Float: PosY, Float: PosZ;
GetPlayerPos(playerid, PosX, PosY, PosZ);
if(PosZ < 0.0)
{
SendClientMessage(playerid, -1, "You are in the water");
}
but i need detect all water pirate ships and others, is it possible?
Re: detect player in water -
Mugala - 20.02.2018
use animlibs too to detect swimming animations, also u can use IsPlayerInRangeOfPoint or Dynamic Areas to detect places such as LV's Pirate Ship Pool
Re: detect player in water -
RogueDrifter - 20.02.2018
I'd say use the include provided by jelly its amazing, link:
https://sampforum.blast.hk/showthread.php?tid=643473
Re: detect player in water -
Pottus - 20.02.2018
https://sampforum.blast.hk/showthread.php?tid=586068
Код:
CA_IsPlayerInWater(playerid, &Float:depth, &Float:playerdepth)
CA_IsPlayerNearWater(playerid, Float:dist=3.0, Float:height=3.0)
@RougeDrifter
That link worked for me but all of sudden that thread seems to have been delete weird.
Re: detect player in water -
cuber - 20.02.2018
Quote:
Originally Posted by Pottus
https://sampforum.blast.hk/showthread.php?tid=586068
Код:
CA_IsPlayerInWater(playerid, &Float:depth, &Float:playerdepth)
CA_IsPlayerNearWater(playerid, Float:dist=3.0, Float:height=3.0)
@RougeDrifter
That link worked for me but all of sudden that thread seems to have been delete weird.
|
Same.
Re: detect player in water -
DeMoo - 20.02.2018
Thanks to all
Re: detect player in water -
Battlezone - 20.02.2018
Quote:
Originally Posted by Pottus
https://sampforum.blast.hk/showthread.php?tid=586068
Код:
CA_IsPlayerInWater(playerid, &Float:depth, &Float:playerdepth)
CA_IsPlayerNearWater(playerid, Float:dist=3.0, Float:height=3.0)
@RougeDrifter
That link worked for me but all of sudden that thread seems to have been delete weird.
|
Not weird.
Re: detect player in water -
RogueDrifter - 20.02.2018
what the fuck when did that get deleted! that just worked for me minutes ago...
Re: detect player in water -
Mugala - 20.02.2018
Quote:
Originally Posted by RogueDrifter
what the fuck when did that get deleted! that just worked for me minutes ago...
|
they deleted cuz u posted it
Re: detect player in water -
Dayrion - 20.02.2018
There is the link here:
https://github.com/Jelly23/IsPlayerTouchingWater
You need to have Pawn.RakNet to run this include