SA-MP Forums Archive
Checkpoint problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Checkpoint problem (/showthread.php?tid=417944)



Checkpoint problem - Kenway - 23.02.2013

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;
                }
              }
    } 



Re: Checkpoint problem - SilverKiller - 23.02.2013

Put a

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


Re: Checkpoint problem - Kenway - 23.02.2013

Still the same problem


Re: Checkpoint problem - Kenway - 23.02.2013

Really dont know how to fix that?


Re: Checkpoint problem - Kenway - 23.02.2013

help?


Re: Checkpoint problem - Misiur - 23.02.2013

What does your IsAC4Boat look like? The problem lies there


Re: Checkpoint problem - Kenway - 23.02.2013

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 



Re: Checkpoint problem - Misiur - 23.02.2013

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


Re: Checkpoint problem - Kenway - 24.02.2013

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