Dialog with timer? - 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: Dialog with timer? (
/showthread.php?tid=444429)
Dialog with timer? -
Kudoz - 16.06.2013
Hello!
I have a dialog which is opened by pressing H within a range. That will open up the dialog with neons and spoilers to attach to your vehicle. I've now created this:
Код:
SetVehiclePos(GetPlayerVehicleID(playerid), -2483.3093,2242.4661,4.5107);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 300.4299);
SetPlayerCameraPos(playerid, -2479.7175,2248.1313,4.9844);
SetPlayerCameraLookAt(playerid, -2483.3093,2242.4661,4.5107);
Most of you know what that means.. anyways, I have to SetCameraBehindPlayer each time they pick something from the dialog because the it closes everytime somethings on the list has been chosen. I want a little timer on 2 seconds which does this:
A player goes into the garage to open the dialog. His car gets set where it should and so does the camera. He then chooses for example a spoiler, and the dialog will close in 2 seconds, then come back up, so he can choose another thing. How can I do this? - Had to use a little story, hard to explain, heh
EDIT: Do I have to use timer to do this? or are there other options?
Kudoz
Re: Dialog with timer? -
Kudoz - 16.06.2013
Forget it, I fixed it.
BUT
I have this now,
Код:
}
else
{
SetCameraBehindPlayer(playerid);
SetVehiclePos(GetPlayerVehicleID(playerid), -2467.3923,2216.8772,4.9844);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 360 ); //Player faces north
..at the end of all the if(listitem == [number] ) .. But it sets the position and the camera anyways.. What do I have to do to fix it?
Re: Dialog with timer? -
Kudoz - 22.07.2013
Can anyone help me with this? forget the post above.. it works sometimes, and other times it doens't, so I've done something wrong.
( Forget the reply above )