[Help]GameTextForPlayer [Loading]
#1

So I have a problem with gametextforplayer.

On an older gamemode it works.But on mine from 0 it dont.

I made that one script with GameTextForPlayer like in the other one.

Now, I want something to load from 1% to 100% (on GameTextForPlayer).It is not moving. It always stays at 1.

Here are the scripts, who really need.



If you see here is set, if it is >= 1, than the GameTextForPlayer is moving/updating to other number.But it don't.
Код:
if(MISSION_LOAD{i} >= 1) { if(newcar == MISSION_TRUCK[0]) { if(MISSION_STARTED == true) { MISSION_LOAD{i} += (1); format(string, (sizeof string), "~n~~n~~n~~n~~n~~w~LOADING: ~g~%d%",MISSION_LOAD{i}); GameTextForPlayer(i, string, 4000, 3); if(MISSION_LOAD{i} >= 100) { MISSION_LOAD{i} = (0); MISSION_TIME = (0); TogglePlayerControllable(i, 1); GameTextForPlayer(i, "~r~Loading finished!", 1000, 3); TRUCK_LOAD_FINISHED = (true);
And here the MISSION_LOAD is set to 1.
Код:
if(newstate == PLAYER_STATE_DRIVER)
	{
		if(vehicle == MISSION_TRUCK[0])
		{
			if(MISSION_STARTED == true)
			{
				 if(TRUCK_LOAD_FINISHED == false)
				 {
                    MISSION_LOAD{playerid} = (1);
                    TogglePlayerControllable(playerid,0);
                    format(string, (sizeof string), "~n~~n~~n~~n~~n~~w~LOADING: ~g~%d%",MISSION_LOAD{playerid});
                    GameTextForPlayer(playerid, string, 4000, 3);
                    SetCameraBehindPlayer(playerid);
Reply
#2

Anyone ?
Reply
#3

Do you have some kind of timer? I assume that second piece of code is in OnPlayerStateChange, I don't know about first one though
Reply
#4

Oh yeah , i forgot a timer, thank you so much.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)