15.09.2014, 14:48
Thanks, Guys for help me
Removed
Removed
if(PlayerInfo[playerid][pJailed])// my variable for checking that is player jailed or not
{
if (PlayerInfo[playerid][pJailHour] >= 0 && PlayerInfo[playerid][pJailMinute] > 0) PlayerInfo[playerid][pJailMinute] --;//
if (PlayerInfo[playerid][pJailHour] > 0 && PlayerInfo[playerid][pJailMinute] == 0)
{
PlayerInfo[playerid][pJailHour] --;
PlayerInfo[playerid][pJailMinute] = 59;
}
if (PlayerInfo[playerid][pJailHour] < 10) format(string, sizeof(string), "0%d",PlayerInfo[playerid][pJailHour]);
else format(string, sizeof(string), "%d",PlayerInfo[playerid][pJailHour]);
if (PlayerInfo[playerid][pJailMinute] < 10) format(string, sizeof(string), "%s:0%d",string,PlayerInfo[playerid][pJailMinute]);
else format(string, sizeof(string), "%s:%d",string,PlayerInfo[playerid][pJailMinute]);
format(string, sizeof(string), "~w~Jail Time: ~g~%s",string);
if(PlayerInfo[playerid][pJailHour] == 0 && PlayerInfo[playerid][pJailMinute] == 0)
{
GameTextForPlayer(playerid,"~w~Jail Sentence Complete~n~Released.", 5000, 3);
SendClientMessage(playerid,COLOR_SKYBLUE, "Your Jail Sentence Is Complete. Released From Jail.");
UnJail(playerid);
format(string, sizeof(string),"",string);
}
TextDrawSetString(StatsDisplay[playerid], string);
}
TextDrawSetString should do it, if you don't know how to code it with this function or you need example tell me.
NOTE: you need to create a per player textdraw and update their string, otherwise if tried to jail 2 players the string of both will be mixed together. |