Textdraw won't hide
#1

Код:
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 ?
Reply
#2

sorry on DP, but thread goes to away.. any help ?
Reply
#3

You need to use textdrawhideforplayer.

More information can be find here:
https://sampwiki.blast.hk/wiki/TextDrawHideForPlayer
Reply
#4

I use this on command: /uncon which is for stop spectating ...

Код:
    TextDrawHideForPlayer(playerid, BRZINA[playerid]);
	TextDrawHideForPlayer(playerid, ZDRAVLJE[playerid]);
Reply
#5

sry for DP, i dont know how to delete post ...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)