detect player in water
#1

hi, i want detect player in any water i using this code in OnPlayerUpdate
PHP код:
    new FloatPosXFloatPosYFloatPosZ;
    
GetPlayerPos(playeridPosXPosYPosZ);
    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?
Reply
#2

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
Reply
#3

I'd say use the include provided by jelly its amazing, link: https://sampforum.blast.hk/showthread.php?tid=643473
Reply
#4

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.
Reply
#5

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.
Reply
#6

Thanks to all
Reply
#7

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.
Reply
#8

what the fuck when did that get deleted! that just worked for me minutes ago...
Reply
#9

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
Reply
#10

There is the link here: https://github.com/Jelly23/IsPlayerTouchingWater
You need to have Pawn.RakNet to run this include
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)