29.08.2010, 16:38
How to create this position counter?
[ame]http://www.youtube.com/watch?v=uroxkFBVqSs[/ame]
[ame]http://www.youtube.com/watch?v=uroxkFBVqSs[/ame]
new CP_Counter[MAX_PLAYERS]; //make an counter per player.
CP_Counter[playerid]++; //will add +1 to the counter
new string[128];
format(string,sizeof string,"You've entered checkpoint %i.",CP_Counter[playerid]); //preparing text for GameText and filling in the counter.
GameTextForPlayer(playerid,string,5000,6); //show for 5 seconds the text
new text:TD_CPcount[MAX_PLAYERS];
TD_CPcount[playerid] = TextDrawCreate(xpos,ypos,"Checkpoint: 0/6"); //we use 6 cp's as example
TextDrawShowForPlayer(playerid,RD_CPcount[playerid]);
//that counter +1 etc (check my other post)
//prepare string with format (dejavu... check other post)
TextDrawSetString(TD_CPcount[playerid],string); //this is the important part, this will update the textdraw
TextDrawDestroy(TD_CPcount[playerid]);