Checkpoint problem
#1

When Im not at a boat its still show me the first message

PHP код:
if(C4B[playerid] == && IsPlayerInRangeOfPoint(playerid5.0, -426.441163.000.70))
    {
        if(
StealingC4[playerid] == playerid)
        {
            new 
vehicle GetPlayerVehicleID(playerid);
            if(
IsAC4Boat(vehicle))
            {
                
BoatHaveC4[GetPlayerVehicleID(playerid)] = 0;
                
RemovePlayerFromVehicle(playerid);
                
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
                
DisablePlayerCheckpoint(playerid);
                
StealingC4[playerid] = 999;
                
PlayerInfo[playerid][pBombs]++;
                
C4B[playerid] = 0;
                
SendClientMessage(playeridCOLOR_LIGHTBLUE,"You got 1 C4 from the stealing");
            }
            else
                    {
                       
GameTextForPlayer(playerid"~r~You are not in a boat!"30001);
                        return 
1;
                }
              }
    } 
Reply
#2

Put a

pawn Код:
return 1;
Under the message : You got 1 c4 from the stealing.
Reply
#3

Still the same problem
Reply
#4

Really dont know how to fix that?
Reply
#5

help?
Reply
#6

What does your IsAC4Boat look like? The problem lies there
Reply
#7

PHP код:

IsAC4Boat
(carid)
{
    for(new 
0sizeof(C4Vehicles); v++)
    {
        if(
carid == C4Vehicles[v]) return 1;
    }
    return 
0;
}

else if(
IsAC4Boat(vehicleid))
        {
            if(
StealingC4[playerid] == playerid)
            {
                if(
BoatHaveC4[GetPlayerVehicleID(playerid)] == 1)
                {
                    
C4B[playerid] = 1;
                    
TogglePlayerControllable(playerid1);
                    
SetPlayerCheckpoint(playerid, -426.44,1163.00,0.705.0);
                    
SendClientMessage(playeridCOLOR_LIGHTBLUE"Drive to the checkpoint to receive C4");
                }
            }
             else
            {
                  
RemovePlayerFromVehicle(playerid);
                new 
Float:slxFloat:slyFloat:slz;
                
GetPlayerPos(playeridslxslyslz);
                
SetPlayerPos(playeridslxslyslz);
                 
NOPCheck(playerid);
                 
SendClientMessageEx(playeridCOLOR_GRAD2"You are not stealing c4");
            }
        }

    
C4Vehicles[0] = AddStaticVehicleEx(472,-1449.8000488,425.3999939,0.0000000,270.0000000,30,30,15); //Coastguard
    
C4Vehicles[1] = AddStaticVehicleEx(472,-1438.0000000,425.3999939,0.0000000,270.0000000,31,31,15); //Coastguard
    
C4Vehicles[2] = AddStaticVehicleEx(472,-1425.9000244,425.3999939,0.0000000,270.0000000,30,30,15); //Coastguard
    
C4Vehicles[3] = AddStaticVehicleEx(472,-1413.4000244,425.3999939,0.0000000,270.0000000,30,30,15); //Coastguard
    
C4Vehicles[4] = AddStaticVehicleEx(472,-1401.6999512,425.3999939,0.0000000,270.0000000,30,30,15); //Coastguard
    
C4Vehicles[5] = AddStaticVehicleEx(472,-1389.9000244,425.3999939,0.0000000,270.0000000,30,30,15); //Coastguard
    
C4Vehicles[6] = AddStaticVehicleEx(472,-1377.5999756,425.3999939,0.0000000,270.0000000,30,30,15); //Coastguard
    
C4Vehicles[7] = AddStaticVehicleEx(472,-1365.5000000,425.3999939,0.0000000,270.0000000,30,30,15); //Coastguard
    
C4Vehicles[8] = AddStaticVehicleEx(472,-1353.5000000,425.3999939,0.0000000,270.0000000,30,30,15); //Coastguard 
Reply
#8

So: everything works fine, but even if you're not in a boat you get "You got 1 C4 from the stealing" messsage? This doesn't make sense, because code is fine
Reply
#9

I know...But it is doing that make me mad
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)