Command Not Working Properly. [continued]
#1

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?
Reply
#2

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;
    }
Reply
#3

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");
Reply
#4

Thanks Its all fixed
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)