22.12.2010, 02:27
Well I have this command
But it will always says 'You are not at the cargo ship!' even if im in it.
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;
}