[Help]GameTextForPlayer [Loading] - 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: [Help]GameTextForPlayer [Loading] (
/showthread.php?tid=412472)
[Help]GameTextForPlayer [Loading] -
luis_mendoza - 02.02.2013
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);
Re: [Help]GameTextForPlayer [Loading] -
luis_mendoza - 02.02.2013
Anyone ?
Re: [Help]GameTextForPlayer [Loading] -
Misiur - 02.02.2013
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
Re: [Help]GameTextForPlayer [Loading] -
luis_mendoza - 02.02.2013
Oh yeah , i forgot a timer, thank you so much.