SA-MP Forums Archive
Fish near the water - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Fish near the water (/showthread.php?tid=363462)



Fish near the water - Mikkel_RE - 27.07.2012

Hello i want to make my fish system that you can fish near the water, but i dont really know how to make it


Re: Fish near the water - Ballu Miaa - 27.07.2012

Check for a coordinates on the fish command!

Example: Command using strcmp
pawn Код:
if(!strcmp("/fish",cmdtext))
    {
        if(IsPlayerInRangeOfPoint(playerid, 7.0, 2695.6880, -1704.6300,11.8438))
        {
            SendClientMessage(playerid,0xFFFFFFFF,"You are not near the Fishing Area!");
        }
        else
        {
            //Your Code when he is at the fishing area.
        }
        return 1;
    }
Command using ZCMD:
pawn Код:
COMMAND:fish(playerid, params[])
    {
        if(IsPlayerInRangeOfPoint(playerid, 7.0, 2695.6880, -1704.6300,11.8438))
        {
            SendClientMessage(playerid,0xFFFFFFFF,"You are not near the Fishing Area!");
        }
        else
        {
            //Your Code when he is at the fishing area.
        }
        return 1;
    }



Re: Fish near the water - Ranama - 27.07.2012

I also think that you should be able to make zones, (i don't know much about ths becuse i've never used zones)
And then you put IsPlayerInZone or what function it is.
and you make one zone for every water place on the map.

Hope you understand what i mean.