Attach3DTextLabelToPlayer and Create3DTextLabel | Problem - 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: Attach3DTextLabelToPlayer and Create3DTextLabel | Problem (
/showthread.php?tid=378872)
Attach3DTextLabelToPlayer and Create3DTextLabel | Problem -
gnoomen2 - 19.09.2012
Problem is that this 3d text label dosent attach to the player. Fix that please :)
pawn Код:
COMMAND:radar(playerid, params[])
{
if(pInfo[playerid][pRadar] == 0)
if(pInfo[playerid][pRadar] == 1) return SendClientMessage(playerid, COLOR_RED, "Your radar is already trying to track a player.");
pInfo[playerid][pRadar] = 1;
if(sscanf(params, "u", radartarget)) return SendClientMessage(playerid, COLOR_RED, "[ERROR] /radar [ID]");
GetPlayerPos(radartarget, tX, tY, tZ);
radar = Create3DTextLabel("Target Lock On\nTracking Target", COLOR_GREEN, 0.0, 0.0, 0.0, 700.0, 0, 0);
Attach3DTextLabelToPlayer(radar, radartarget, tX, tY, tZ);
return 1;
}
COMMAND:radaroff(playerid, params[])
{
if(pInfo[playerid][pRadar] == 0) return SendClientMessage(playerid, COLOR_RED, "Your radar is not tracking a player.");
pInfo[playerid][pRadar] = 0;
DeletePlayer3DTextLabel(radartarget, radar);
return 1;
}
Re: Attach3DTextLabelToPlayer and Create3DTextLabel | Problem - HuSs3n - 19.09.2012
replace
Attach3DTextLabelToPlayer(radar, radartarget, tX, tY, tZ);
with
Attach3DTextLabelToPlayer(radar, radartarget,0.0, 0.0,0.5);