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;
}
if(gTeam[playerid] == TEAM_ARMY)
{
if(gTeam[playerid] == TEAM_ARMY || gTeam[playerid] == TEAM_COP)
{
|
pawn Код:
pawn Код:
|
|
I think using switch-case function might solve your problem...
|
|
Well while playing as army are you able to see only the first checkpoint?
|
|
else if(gTeam[playerid] == TEAM_PILOT)
^^ this will work,check it out. |
if(IsPlayerInRangeOfPoint(playerid,100.0,................ SetPlayerCheckpoint(playerid,-1314.2576,498.6849,18.2344, 7.0);