Textdraw won't hide - 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: Textdraw won't hide (
/showthread.php?tid=404923)
Textdraw won't hide -
FL3GM4 - 04.01.2013
Код:
CMD:recon(playerid, params[])
{
new id, string[128];
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_RED"| "COL_LIGHTBLUE"WS:DM "#COL_RED"| "#COL_WHITE"Niste ovlasteni za ovu komandu");
if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_WHITE, "/recon [playerid]");
if(id == INVALID_PLAYER_ID || !IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_RED"| "COL_LIGHTBLUE"WS:DM "#COL_RED"| "#COL_WHITE"Pogresan ID");
TogglePlayerSpectating(playerid, 1);
SetPlayerInterior(playerid, GetPlayerInterior(id));
if(IsPlayerInAnyVehicle(id))
{
new specvehicleid = GetPlayerVehicleID(id);
PlayerSpectateVehicle(playerid, specvehicleid);
TextDrawShowForPlayer(playerid, BRZINA[id]);
TextDrawShowForPlayer(playerid, ZDRAVLJE[id]);
}
else
{
PlayerSpectatePlayer(playerid, id);
}
format(string, sizeof(string), "Sada reconas %s, da ga prestanes reconat koristi: /uncon", PlayerName(id));
SendClientMessage(playerid, Grey, string);
return 1;
}
CMD:uncon(playerid, params[])
{
#pragma unused params
TogglePlayerSpectating(playerid, 0);
SetPlayerPos(playerid, spawnX, spawnY, spawnZ);
TextDrawHideForPlayer(playerid, BRZINA[playerid]);
TextDrawHideForPlayer(playerid, ZDRAVLJE[playerid]);
return 1;
}
why textdraw won't hide for specator ?
Re: Textdraw won't hide -
FL3GM4 - 05.01.2013
sorry on DP, but thread goes to away.. any help ?
Re: Textdraw won't hide -
nilanjay - 05.01.2013
You need to use textdrawhideforplayer.
More information can be find here:
https://sampwiki.blast.hk/wiki/TextDrawHideForPlayer
Re: Textdraw won't hide -
FL3GM4 - 05.01.2013
I use this on command: /uncon which is for stop spectating ...
Код:
TextDrawHideForPlayer(playerid, BRZINA[playerid]);
TextDrawHideForPlayer(playerid, ZDRAVLJE[playerid]);
Re: Textdraw won't hide -
FL3GM4 - 05.01.2013
sry for DP, i dont know how to delete post ...