timer on screen robbery thing
#1

Hey

This might be another stupid question but I'm chaning my dialog box in my script, a dialog box that comes up when you rob whitch makes you unable to move untill its done so I want the timer on the screen, what do I need to do here?

Код:
	            RobbingSchool[i] --;
	        GameTextForPlayer,"Robbing Driving School.\nFinish Robbery in: %d seconds.\nPolice are on the way."
                GameTextForPlayer,"{FF0000}Driving School Robbery"
			}
Reply
#2

Hold on I forgot the name of the %d timer at the end


Код:
              RobbingSchool[i] --;
				GameTextForPlayer,"Robbing Driving School.\nFinish Robbery in: %d seconds.\nPolice are on the way.",RobbingSchool[i]);
				GameTextForPlayer,"{FF0000}Driving School Robbery";
I'm tired and I messed around in this for a while now.. please help me out
Reply
#3

I realise I have to use it something like :
Quote:

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new string[18];
format(string, sizeof(string), "Vehicle ID: %i", vehicleid);
GameTextForPlayer(playerid, string, 3000, 1);
return 1;
}

But I don't know how to mix then together without fucking it up.. can't get it made correctly somehow
Reply
#4

you need to use format if you're using any variable to count it.

try this
pawn Код:
new string[128];
format(string,sizeof(string),"Robbing Driving School~n~%i Seconds Left",RobbingSchool[i]);
GameTextForPlayer(playerid, string, 1000, 5);
Reply
#5

Thanks, I get these though.

Код:
warning 219: local variable "string" shadows a variable at a preceding level
 error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#6

ohh. you already have a variable of string

remove new string[128];
and
change playerid to i as you are looping it.
Reply
#7

Thanks
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)