Gametextforplayer with % progress? -
Face9000 - 21.12.2011
Hello guys,i'm scripting a turf system and i need GameTextForPlayer shows the % of taking turf.
I've already the variables/functions to check if the player is in the area,i just need to make this.
Example: "Taking turf..10%...11%...12%" and so on.
Thanks !
Re: Gametextforplayer with % progress? -
jamiesage123 - 21.12.2011
I'd do something like this:
pawn Код:
new progress, turfTimer;
forward turfProgress(playerid);
public turfProgress(playerid)
{
//IsPlayerInRangeOfPoint, etc...
progress++;
new string[50];
format(string, sizeof(string), "%d%", progress);
GameTextForPlayer(playerid, string, 650, 3);
if(progress == 100) {
KillTimer(turfTimer);
// Set them owner of that turf, etc.
}
}
//CMD:taketurf or however you are doing it
progress = 0;
turfTimer = SetTimerEx("turfProgress", 700, true, "i", playerid);
Re: Gametextforplayer with % progress? -
skaTim - 21.12.2011
delete.
Re: Gametextforplayer with % progress? -
Face9000 - 21.12.2011
Quote:
Originally Posted by jamiesage123
I'd do something like this:
|
Thanks,but i've already my public TakeOver function.
No need to enter in a checkpoint or using a cmd,just entering in a zone.
How to adapt it?
Re: Gametextforplayer with % progress? -
Tee - 21.12.2011
The percents sign doesn't work in SA-MP, however you can use the altcode (hold alt and press 0137).
It looks like this: ‰ (Per Mile sign)
When the player enters the checkpoint just set a timer.
pawn Код:
SetTimerEx("turfProgress", 700, true, "i", playerid);
Re: Gametextforplayer with % progress? -
Face9000 - 21.12.2011
Oh..thanks
Re: Gametextforplayer with % progress? -
-Rebel Son- - 21.12.2011
Why not make a textdraw? they are easy'r to script.
Re: Gametextforplayer with % progress? -
Face9000 - 21.12.2011
Quote:
Originally Posted by -Rebel Son-
Why not make a textdraw? they are easy'r to script.
|
Yeah textdraw are better but i've started learning with that.Any help is appreciated.