29.05.2014, 17:15
From the code given below you can see that the /work command is clearly for the army/cia and the pilots only .
The checkpoints display for the army but not for the normal pilots . Im not getting any errors or something .
The wrong code is somewhere in there . But what?
pawn Код:
CMD:work(playerid, params[])
{
if(WorkInfo[playerid][IsWorking] == 1)
{
SendClientMessage(playerid, COLOR_RED, "You're already working");
}
if(gTeam[playerid] == TEAM_ARMY)
{
if(IsPlayerInRangeOfPoint(playerid,100,-1314.2576,498.6849,18.2344) && IsPlayerInHydra(playerid))
{
WorkInfo[playerid][IsWorking] = 1;
WorkInfo[playerid][Job1] = 1;
SendClientMessage(playerid,COLOR_WHITE,"[{FFA500}FLIGHT{EEEEEE}]Complete a flight from SF Carrier to A51");
SetPlayerCheckpoint(playerid,-1314.2576,498.6849,18.2344, 7);
return 1;
}
if(IsPlayerInRangeOfPoint(playerid,100,311.3356,2049.9468,17.6406) && IsPlayerInHydra(playerid))
{
WorkInfo[playerid][IsWorking] = 1;
WorkInfo[playerid][Job2] = 1;
SendClientMessage(playerid,COLOR_WHITE,"[{FFA500}FLIGHT{EEEEEE}]Complete a flight from A51 to SF Carrier");
SetPlayerCheckpoint(playerid,311.3356,2049.9468,17.6406, 7);
}
}
if(gTeam[playerid] == TEAM_PILOT)
{
if(IsPlayerInRangeOfPoint(playerid,100,-1248.3126,14.4799,14.1484)) //&& IsPlayerInCivilPlane(playerid))
{
WorkInfo[playerid][IsWorking] = 1;
WorkInfo[playerid][SFAtoLVA] = 1;
SendClientMessage(playerid,COLOR_WHITE,"[{00FF00}PILOT FLIGHT{EEEEEE}]Complete a flight from SFA to LVA ");
SetPlayerCheckpoint(playerid,-1388.9904,-202.2983,14.1484,7);
}
if(IsPlayerInRangeOfPoint(playerid,100,1578.9878,1535.3451,10.8305))
{
WorkInfo[playerid][IsWorking] = 1;
WorkInfo[playerid][LVAtoLSA] = 1;
SendClientMessage(playerid,COLOR_WHITE,"[{00FF00}PILOT FLIGHT{EEEEEE}]Complete a flight from LVA to LSA ");
SetPlayerCheckpoint(playerid,1578.9878,1535.3451,10.8305,7);
}
if(IsPlayerInRangeOfPoint(playerid,500,1644.6799,-2413.4983,13.5547))
{
WorkInfo[playerid][IsWorking] = 1;
WorkInfo[playerid][LSAtoSFA] = 1;
SendClientMessage(playerid,COLOR_WHITE,"[{00FF00}PILOT FLIGHT{EEEEEE}]Complete a flight from LSA to SFA");
SetPlayerCheckpoint(playerid,1644.6799,-2413.4983,13.5547,7);
}
}
return 1;
}
The wrong code is somewhere in there . But what?


