Checkpoint Delay
#1

Description: I am currently scripting side-jobs on my server. I am working on a delivery side-job right now.
(delivering packages). What I have so far is a 12 checkpoint job where each checkpoint you stop and advance. Now to make it more realistic I was hoping someone could tell me how to make the checkpoint delay for 5 seconds and say "UNLOADING PACKAGES FROM VEHICLE".What I mean is, when you pickup the next checkpoint, I want the truck to freeze for about 5 seconds and say "UNLOADING PACKAGES FROM VEHICLE".

Here is a checkpoint example.

PHP код:

        
if(PizzaJob[playerid] == 3){
            
PizzaJob[playerid] = 4;
            
SetPlayerCheckpoint(playerid,1938.6512,165.6472,37.2813,3);
            
PlayerPlaySound(playerid11390.00.00.0);
            return 
1;
         }
        if(
PizzaJob[playerid] == 4){
            
PizzaJob[playerid] = 5;
            
SetPlayerCheckpoint(playerid,1545.8014,17.1668,24.1406,3);
            
PlayerPlaySound(playerid11390.00.00.0);
            return 
1
What I showed you is a checkpoint transfer from 3-4 during the sidejob. Can someone make the checkpoint pause for 5 seconds instead of moving off right away. I would also like the vehicle to be frozen during the "UNLOADING PACKAGES" too. Like I said, once it says that for 5 seconds, I want the next checkpoint to show up and the vehicle to un-freeze. I will rep all helpful posts!
Reply
#2

try to make timer for checkpoint of corse timer and use else if instead of if...

Quote:

else if(PizzaJob[playerid] == 4){
PizzaJob[playerid] = 5;
SetPlayerCheckpoint(playerid,1545.8014,17.1668,24. 1406,3);
PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
return 1;

Because if you are using if it's like

if process .... ends
and next one is the same.. but if you are use ing else if it is

if process ...... and here goes else if... continuous and ends....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)