SA-MP Forums Archive
Command not working properly - 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 (/showthread.php?tid=201710)



Command not working properly - admantis - 22.12.2010

Well I have this command
pawn Код:
if (strcmp("/stealbounty", cmdtext, true) == 0)
    {
        if (!IsPlayerInRangeOfPoint(playerid,30,-1371, 1495, 1)) return SendClientMessage(playerid,COLOR_RED,"ERROR: You are not at the cargo ship!");
        if (!IsPlayerInRangeOfPoint(playerid,30,-2475, 1546, 33)) return SendClientMessage(playerid,COLOR_RED,"ERROR: You are not at the cargo ship!");
        if (PlayerTeam[playerid] != TEAM_PIRATES) return SendClientMessage(playerid,COLOR_RED,"ERROR: You don't have enough knowledge and tools to do this!");
        if (ShipIsBeingTaken == 1) return SendClientMessage(playerid,COLOR_RED,"ERROR: Someone is already trying to take the cargo ship!");
        if (BountyRecentlyStolen == 1) return SendClientMessage(playerid,COLOR_RED,"ERROR: The bounty has recentled being stolen.");
        SendClientMessageToAll(COLOR_BROWN,"INFO: The pirates are taking over the cargoship and will succed in 30 seconds!");
        ShipTimer = SetTimer("ShipTakenSec",1200,1);
        SetTimer("BountyCoolDown",600000,0);
        return 1;
    }
But it will always says 'You are not at the cargo ship!' even if im in it.


Re: Command not working properly - Basicz - 22.12.2010

Because the position are not a float?
And, you sure if the position are correct?