Checkpoints wont show.
#1

From the code given below you can see that the /work command is clearly for the army/cia and the pilots only .
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 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?
Reply
#2

pawn Код:
if(gTeam[playerid] == TEAM_ARMY)
        {
use
pawn Код:
if(gTeam[playerid] == TEAM_ARMY || gTeam[playerid] == TEAM_COP)
        {
Reply
#3

Quote:
Originally Posted by superrobot48
Посмотреть сообщение
pawn Код:
if(gTeam[playerid] == TEAM_ARMY)
        {
use
pawn Код:
if(gTeam[playerid] == TEAM_ARMY || gTeam[playerid] == TEAM_COP)
        {
I know about that , i added it after i posted it here , what i want is to know why the checkpoints wont show for the PILOTS.
Reply
#4

I think using switch-case function might solve your problem...
Reply
#5

Quote:
Originally Posted by DavidBilla
Посмотреть сообщение
I think using switch-case function might solve your problem...
Thats not the problem . If that was it , which isn't , the army players wouldn't be able to see the checkpoints either.
Reply
#6

Well while playing as army are you able to see only the first checkpoint?
Reply
#7

Quote:
Originally Posted by DavidBilla
Посмотреть сообщение
Well while playing as army are you able to see only the first checkpoint?
As an army/cia member i can see all the checkpoints for the army .
I can see :
The checkpoints from:
SF Carrier to A51
A51 to SF Carrier .

I cant see:
SFA TO LVA
LVA TO LSA
LSA TO SFA.
(The rest of the checkpoints)
Reply
#8

else if(gTeam[playerid] == TEAM_PILOT)

^^ this will work,check it out.
Reply
#9

Quote:
Originally Posted by DavidBilla
Посмотреть сообщение
else if(gTeam[playerid] == TEAM_PILOT)

^^ this will work,check it out.
It didn't work .
Reply
#10

change Int to Float

Код:
if(IsPlayerInRangeOfPoint(playerid,100.0,................

SetPlayerCheckpoint(playerid,-1314.2576,498.6849,18.2344, 7.0);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)