Trucker Mission
#2

PHP код:
Trucker_OnPlayerEnterCheckpoint(playerid)
{
    
// Check if the player is inside his vehicle while entering a checkpoint
    
if (GetPlayerVehicleID(playerid) == APlayerData[playerid][VehicleID])
    {
        
// Also check if the player still has his trailer attached
        
if (APlayerData[playerid][TrailerID] == GetVehicleTrailer(GetPlayerVehicleID(playerid)))
        {
            
// Check the jobstep
            
switch (APlayerData[playerid][JobStep])
            {
                
// JobStep is 1 (truckdriver is loading his goods at the checkpoint)
                 
case 1:
                 }
                  
format(RouteText50"Loading");
                  
TextDrawSetString(APlayerData[playerid][MissionText], RouteText);
                }
                
// JobStep is 2 (truckdriver is unloading his goods at the checkpoint) or 3 (unloading for convoys)
                
case 23:
                }
                  
format(RouteText50"Unloading");
                  
TextDrawSetString(APlayerData[playerid][MissionText], RouteText);
                }
               }
            
// Disable the player's actions (he cannot move anymore)
            
TogglePlayerControllable(playerid0);
            
// Start a timer (Public function "LoadUnload(playerid)" gets called when the timer runs out)
            
APlayerData[playerid][LoadingTimer] = SetTimerEx("Trucker_LoadUnload"5000false"d" playerid);
        }
        else
            
SendClientMessage(playerid0xFFFFFFFFTXT_NeedTrailerToProceed);
    }
    else
        
SendClientMessage(playerid0xFFFFFFFFTXT_NeedVehicleToProceed);

    return 
1;

Try that.
Reply


Messages In This Thread
Trucker Mission - by DerickClark - 18.05.2013, 04:18
Re: Trucker Mission - by edgargreat - 18.05.2013, 04:51
Re: Trucker Mission - by Threshold - 18.05.2013, 05:09
Re: Trucker Mission - by DerickClark - 18.05.2013, 15:00
Re: Trucker Mission - by NL-Sultan - 18.05.2013, 15:05

Forum Jump:


Users browsing this thread: 1 Guest(s)