IsPlayerNearWater not working as it should
#8

Quote:
Originally Posted by AbyssMorgan
Посмотреть сообщение
Command:
PHP код:
if (strcmp("/fish"cmdtexttrue10) == 0)
{
    if(
IsPlayerConnected(playerid)){
    
        if(
IsPointInWaterFrontOfPlayer(playerid,2.0)) //<--- detection range
        
{
            if(
Fishes[playerid][pWeight1] > && Fishes[playerid][pWeight2] > && Fishes[playerid][pWeight3] > && Fishes[playerid][pWeight4] > && Fishes[playerid][pWeight5] > 0)
            {
                
SendClientMessage(playeridCOLOR_GREY"   You've already caught five fish, sell / eat / release them before catching more!");
                return 
1;
            }
            if(
Fishing[playerid] == 0)
            {
                
//Fishing[playerid] = 1;
                
SetTimerEx("FishTimer"5000false"i"playerid);
                
SendClientMessage(playerid,0xFFFFFFFF"You threw the line in the water.");
            }
            else
            {
                
SendClientMessage(playerid,COLOR_GREY"You already Fishing !");
            }
            return 
1;
        } else {
            return 
SendClientMessage(playerid,COLOR_GREY"You aren't at the water!");
        }
    }
    return 
1;

Function IsPointInWaterFrontOfPlayer(playerid,Float:radius) for MapAndreas / ColAndreas Precision
https://sampforum.blast.hk/showthread.php?pid=3591517#pid3591517
Tested, you can also change the range, now is 2.0
This is so wierd, neither this is working
i can still fish everywhere
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)