SA-MP Forums Archive
Command Not Working Properly. [continued] - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Command Not Working Properly. [continued] (/showthread.php?tid=277160)



Command Not Working Properly. [continued] - fie - 16.08.2011

I have this command.

Quote:

if(strcmp(cmd, "/loadproducts", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInRangeOfPoint(playerid, 7, -75.2536,-1598.1886,2.6172))
{
SendClientMessage(playerid, -1, "Deliver the Products to IdleWood Gas Station. (RED MARK)");
return 1;
}
}
else
{
SendClientMessage(playerid, -1, "You are not at the Pickup place");
}
return 1;
}

IG when i type /loadproducts when i am not near the point it says nothing. But i want it to say Your are not at the pickup place.

When i am at the point however, it works.

Any Way to Fix this?


Re: Command Not Working Properly. [continued] - PhoenixB - 16.08.2011

You didnt need to make double posts on the same thing anyway try this coding:

pawn Код:
if(strcmp(cmd, "/loadproducts", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(IsPlayerInRangeOfPoint(playerid, 7, -75.2536,-1598.1886,2.6172);
            {
                SendClientMessage(playerid, COLOR_BLUE, "Deliver the Products to IdleWood Gas Station. (RED MARK)");
            }
        else
        {
            SendClientMessage(playerid, COLOR_GRAD2, "You are not at the Pickup place");
            return 1;
        }
        return 1;
    }



Re: Command Not Working Properly. [continued] - Jefff - 16.08.2011

pawn Код:
if(!strcmp(cmd, "/loadproducts", true)) return IsPlayerInRangeOfPoint(playerid,7,-75.2536,-1598.1886,2.6172) ? SendClientMessage(playerid, COLOR_BLUE, "Deliver the Products to IdleWood Gas Station. (RED MARK)") : SendClientMessage(playerid, COLOR_GRAD2, "You are not at the Pickup place");



Re: Command Not Working Properly. [continued] - fie - 16.08.2011

Thanks Its all fixed