10.05.2013, 02:32
not showing jail textdraw.
Define
it only show time remaining when it is under 60 seconds left, even if you edit it
Код:
// This is the timer that runs for every player who's in jail public UnjailPlayer(playerid) { new JailMsg[20]; // Check if the player is allowed to leave yet if (APlayerData[playerid][PlayerJailed] == 0) { // Set the player in the normal world SetPlayerVirtualWorld(playerid, 0); // Set player interior to the outside SetPlayerInterior(playerid, 0); // Put the player outside the jail (he should spawn at the location where he spawned after login or after choosing a rescue-point) SpawnPlayer(playerid); // Also, kill the jailtimer KillTimer(APlayerData[playerid][PlayerJailedTimer]); } else { // Show the remaining jailtime (only if the remaining time is below 60 seconds) if (APlayerData[playerid][PlayerJailed] < 60) { format(JailMsg, 20, TXT_JailTimer, APlayerData[playerid][PlayerJailed]); new RouteText[55]; format(RouteText, 55, "%s", JailMsg, " "); TextDrawSetString(APlayerData[playerid][MissionText], RouteText); //GameTextForPlayer(playerid, JailMsg, 750, 4); } // Decrease the jailtime by 1 second APlayerData[playerid][PlayerJailed] = APlayerData[playerid][PlayerJailed] - 1; } }
Код:
#define TXT_JailTimer "~w~Time Remaining: ~r~%i~w~"
Код:
// Show the remaining jailtime (only if the remaining time is below 60 seconds) if (APlayerData[playerid][PlayerJailed] < 60)