Not showing textdraw - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Not showing textdraw (
/showthread.php?tid=438195)
Not showing textdraw -
DerickClark - 19.05.2013
Not showing textdraw
pawn Код:
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]);
new RouteText[50];
format(RouteText, 50, "Time Remaining: %s%i~w~", JailMsg, APlayerData[playerid][PlayerJailed]);
TextDrawSetString(APlayerData[playerid][MissionText], RouteText);
APlayerData[playerid][PlayerJailed] = APlayerData[playerid][PlayerJailed] -1;
}
}
Re: Not showing textdraw -
Black Wolf - 19.05.2013
Yeah its becoz you haven't added this line after TextDrawSetString
pawn Код:
TextDrawShowForPlayer(playerid, Textdraw);
Re: Not showing textdraw -
DerickClark - 19.05.2013
it Wont work with that....
It's not any textdraw type...
Re: Not showing textdraw -
Black Wolf - 19.05.2013
pawn Код:
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]);
new RouteText[50];
format(RouteText, 50, "Time Remaining: %s%i~w~", JailMsg, APlayerData[playerid][PlayerJailed]);
TextDrawSetString(APlayerData[playerid][MissionText], RouteText);
TextDrawShowForPlayer(playerid, RouteText);
APlayerData[playerid][PlayerJailed] = APlayerData[playerid][PlayerJailed] -1;
}
}
Just try it once.
Re: Not showing textdraw -
DerickClark - 19.05.2013
Код:
error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Re: Not showing textdraw -
NathNathii - 19.05.2013
pawn Код:
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 200 seconds)
if (APlayerData[playerid][PlayerJailed] < 200)
{
new RouteText[50];
format(RouteText, 50, "Time Remaining: %s~r~%i~w~", JailMsg, APlayerData[playerid][PlayerJailed]);
TextDrawSetString(APlayerData[playerid][MissionText], RouteText);
}
// Decrease the jailtime by 1 second
APlayerData[playerid][PlayerJailed] = APlayerData[playerid][PlayerJailed] -1;
}
}
Re: Not showing textdraw -
marsmubarak - 06.07.2013
mee too facing this problem