Quote:
Originally Posted by AbyssMorgan
Command:
PHP код:
if (strcmp("/fish", cmdtext, true, 10) == 0)
{
if(IsPlayerConnected(playerid)){
if(IsPointInWaterFrontOfPlayer(playerid,2.0)) //<--- detection range
{
if(Fishes[playerid][pWeight1] > 0 && Fishes[playerid][pWeight2] > 0 && Fishes[playerid][pWeight3] > 0 && Fishes[playerid][pWeight4] > 0 && Fishes[playerid][pWeight5] > 0)
{
SendClientMessage(playerid, COLOR_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", 5000, false, "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