06.02.2010, 09:13
I'ts easy.
First, make the dialog:
Now, after OnPlayerDialogResponse(blah,blah...), do this:
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:
and the timer, when you enter the checkpoint:
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 !!!
First, make the dialog:
Код:
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Available jobs","Office\nOthers","Ok","Cancel");
Код:
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); } } }
Do the rest of the on the callback OnPlayerEnterCheckPoint, you will have to use timers:
on the top of the script:
Код:
new Timer1;
Код:
Timer1 = SetTimerEx("DoTheThing",TIME,false,"i",playerid);
Time - is the time in miliseconds...
Ok, so you should do rest of the thing, using this sample. Good luck !!!