Posts: 48
Threads: 15
Joined: Nov 2017
Reputation:
0
Hello one question im making a jail command and i did it and i do for gametextshowforplayer something like this
time[targetid] = 3600000;
format(time,sizeof(time), "Vreme Zatvora: %d",time);
GameTextForPlayer(targetid,time,5000,3);
i have one question now how to make gametextshowforplayer that will repeat every second with one second down like if he have 3600 sec to after one sec 3599 that he can see
Posts: 357
Threads: 6
Joined: Feb 2018
pawn Код:
new timercount[MAX_PLAYERS] = 0;
//In the command
time[targetid] = 3600000;
timercount[targetid] = SetTimerEx("CountTimer", 1000, true, "i", targetid);
//function
forward CountTimer(playerid)
public CountTimer(playerid);
{
time[playerid]--;
new time[50];
format(time,sizeof(time), "Vreme Zatvora: %d",time[playerid);
GameTextForPlayer(playerid, time ,5000,3);
if(time[playerid] == 0)
{
KillTimer(timercount[playerid]);
// Releasing from jail code
return 1;
}
return 1;
}
Posts: 48
Threads: 15
Joined: Nov 2017
Reputation:
0
dont work dont tick the gametext good
Posts: 48
Threads: 15
Joined: Nov 2017
Reputation:
0
dont work it dont convert good it get me unjailed for one sec i dont get gametext so dont work
Posts: 48
Threads: 15
Joined: Nov 2017
Reputation:
0
fixed it put something from me and it work i only need gametextforplayer
Posts: 48
Threads: 15
Joined: Nov 2017
Reputation:
0
i fixed leaving in second with onplayerupdate now how to make gametext that will repeat every second it only show it to me and not change time