2021-06-03, 06:14 AM
(This post was last modified: 2021-06-03, 06:15 AM by AbyssMorgan.)
(2021-05-30, 09:28 PM)Radical Wrote:(2021-05-26, 03:28 PM)AbyssMorgan Wrote:(2021-05-25, 11:18 PM)Radical Wrote: Item::IsPointInWaterOrient function is not woking for me.
If water in 3 m of player front it's not detecting.
I use colandreas and it loaded 100%,?I don't know what's wrong.
Code:if(!PlayerFishing[playerid]) {
? ? if(!Item::IsPointInWaterOrient(playerid,item_player,3.0,o_front)) return 0;
? ? PlayerFishing[playerid] = 1;
? ? GameTextForPlayer(playerid, "~w~Fishing...", 5000, 4);
}
Funcion work, howerer 3.0 radius is to small for fishing as you can see on video:
https://www.youtube.com/watch?v=Y-CdLwk8eOw
This problem is solved, but I can fish even when I am in the water. Why?
Code:
if(!PlayerFishing[playerid]){
if(!Item::IsPointInWaterOrient(playerid,item_player,3.0,o_front)) return 0;
if(!IsCollisionFlag(Item::GetCollisionFlags(playerid,itme_player),POSITION_FLAG_GROUND)) return 0;
PlayerFishing[playerid] = 1;
GameTextForPlayer(playerid, "~w~Fishing...", 5000, 4);
}