Need help: Randomization, Saving Jobs, Taxi System
#5

I'ts easy.

First, make the dialog:

Код:
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Available jobs","Office\nOthers","Ok","Cancel");
Now, after OnPlayerDialogResponse(blah,blah...), do this:

Код:
if(dialogid==1){
     if(response){
     if(listitem==0){
     new rand = random(ammount of coordinations u have in that array);
     SetPlayerCheckPoint(playerid,Coords[rand][0],Coords[rand][1],Coords[rand][2],5);
     }
     }
     }
You see, Coords[rand] name to the array you made with the coords. (it must be Float:Array) Like, my is Coords, and its Coords[rand]...

Do the rest of the on the callback OnPlayerEnterCheckPoint, you will have to use timers:

on the top of the script:
Код:
new Timer1;
and the timer, when you enter the checkpoint:
Код:
Timer1 = SetTimerEx("DoTheThing",TIME,false,"i",playerid);
DoTheThing - must be public callback made by you, for the rest things as you said...
Time - is the time in miliseconds...

Ok, so you should do rest of the thing, using this sample. Good luck !!!




Reply


Messages In This Thread
Need help: Randomization, Saving Jobs, Taxi System - by CrucixTM - 04.02.2010, 15:04
Re: Need help: Randomization, Saving Jobs, Taxi System - by CrucixTM - 04.02.2010, 16:20
Re: Need help: Randomization, Saving Jobs, Taxi System - by Universal - 04.02.2010, 19:05
Re: Need help: Randomization, Saving Jobs, Taxi System - by CrucixTM - 04.02.2010, 19:23
Re: Need help: Randomization, Saving Jobs, Taxi System - by Universal - 06.02.2010, 09:13
Re: Need help: Randomization, Saving Jobs, Taxi System - by CrucixTM - 06.02.2010, 09:33

Forum Jump:


Users browsing this thread: 1 Guest(s)