Player in water.
#1

Heey guys,
I want to make a fishing system but how can i know if the players is in water.
because i want to make that you can fish if you are in a boat and when you on land with boat that it says you need to be in the water to fish?
Thanks Admigo
Reply
#2

You can check if the player has the SWIM animation.
Don't have the code here though, you can search it.
Reply
#3

Code:
new Float:XPos,Float:YPos,Float:ZPos;
GetVehiclePos(GetPlayerVehicleID(playerid),XPos,YPos,ZPos);
if(ZPos>-1 && Zpos<1)
{
then the vehicle is at water level...
if(ZPos>-1 && Zpos<1) works when the sea is calm, so idk if it works all time (erm.. at each weather)...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)