[Help] Admin Tag - 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: [Help] Admin Tag (
/showthread.php?tid=392846)
[Help] Admin Tag -
StopFondlinMe - 16.11.2012
Could someone explain how to make an admin tag above the admin's head?
Re: [Help] Admin Tag -
Ballu Miaa - 16.11.2012
First you need to create a 3dtextlabel and then you need to attach it to player!
Example:
pawn Код:
public OnPlayerConnect(playerid)
{
new Text3D:label = Create3DTextLabel("Hello, I am new here!", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
return 1;
}
Note: You wont be able to see attached 3dTextLabels to your own player just like the NameTag of SA-MP.
Re: [Help] Admin Tag -
StopFondlinMe - 16.11.2012
How would you do it for admins?
Like:
Example Roleplay Administrator
Example Name
Server Owner
Re: [Help] Admin Tag -
iGetty - 16.11.2012
Easy.
pawn Код:
public OnPlayerConnect(playerid)
{
new pName[24], string[52];
GetPlayerName(playerid, pName, 24);
format(string, sizeof(string), "Example Roleplay Administrator\n%s\nServer Owner", pName);
new Text3D:label = Create3DTextLabel(string, 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
return 1;
}
Re: [Help] Admin Tag -
Ballu Miaa - 16.11.2012
pawn Код:
public OnPlayerConnect(playerid)
{
if(pInfo[playerid][pAdmin] > 0)//Change this to your game modes admin variable!
{
new Text3D:label = Create3DTextLabel("Administrator", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
return 1;
}
}
Re: [Help] Admin Tag -
iGetty - 16.11.2012
Thanks Ballu, forgot that part >.<
Re: [Help] Admin Tag -
Ballu Miaa - 16.11.2012
Quote:
Originally Posted by iGetty
Thanks Ballu, forgot that part >.<
|
Haha not a problem my bro!