SA-MP Forums Archive
Where should I start from? - 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: Where should I start from? (/showthread.php?tid=467124)



Where should I start from? - MAFIAWARS - 01.10.2013

Hello ! I want to make a Dialog that shows a Player that How many seconds left in Jail...
My friend gave me that code but I am not understanding where should I start to write it from. In under which command or....

pawn Код:
if( Time_Jail[ playerid ] != -1 )
{
// use format:
format( ... , "%d seconds left", Time_Jail[ playerid ] - ( gettime( ) - Seconds_Left_Jail[ playerid ] ) )
// show the seconds left
}



Re: Where should I start from? - ]Rafaellos[ - 01.10.2013

Create a timer that will call a function every 1 second. Check if timerleft == 0 then stop the timer else timeleft--; and print the message.


Re: Where should I start from? - MAFIAWARS - 01.10.2013

Already Created. But Just tell me what I asked...


Re: Where should I start from? - Lidor124 - 01.10.2013

Which type of Dialog you want? and how do you want it will be showed?


Re: Where should I start from? - MAFIAWARS - 01.10.2013

I want dialog at my Right of my Screen and It should be like this:

Time Left in Jail:
500

Time left in Jail should be in Red Color and Seconds should be in White colorr


Re: Where should I start from? - ]Rafaellos[ - 01.10.2013

You mean textdraw?


Re: Where should I start from? - Lidor124 - 01.10.2013

He means GameTextForPlayer https://sampwiki.blast.hk/wiki/GameTextForPlayer


Re: Where should I start from? - MAFIAWARS - 01.10.2013

Noo...I want a Dialog...Not a TextDraw. I know How to create a Text Draw But I want a Dialog...

Quote:
Originally Posted by MAFIAWARS
Посмотреть сообщение
I want dialog at my Right of my Screen and It should be like this:

Time Left in Jail:
500

Time left in Jail should be in Red Color and Seconds should be in White colorr



Re: Where should I start from? - Lidor124 - 01.10.2013

Its impossible on dialog in the right side of the screen, if you want to use dialog its only in the center of the screen and its can be only MSGBOX or Listitem for your format of timeleft in jail.


Re: Where should I start from? - MAFIAWARS - 01.10.2013

Okay, Then I want like that: It show the Client Message to those Player who will be jailed by Admin, like this:

[ ! ] 500 seconds left in jail
[ ! ] 495 seconds left in jail
[ ! ] 490 seconds left in jail
[ ! ] 485 seconds left in jail
[ ! ] 480 seconds left in jail
[ ! ] 475 seconds left in jail
etc

[If Player jailed for 500 sec]

Can you tell me How can I do that?