SA-MP Forums Archive
3d label - 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: 3d label (/showthread.php?tid=635649)



3d label - crukk11 - 11.06.2017

i have make this 3d label but i dont how to make the 3d label attach to admin exp:if admin login it show the 3d label to player

PHP Code:
new string[MAX_PLAYER_NAME];
new 
Text3D:PlayerLabel[MAX_PLAYERS];
format(string,sizeof(string),"[Admin] %s",pName(playerid));
PlayerLabel[playerid] = Create3DTextLabel(stringCOLOR0.00.00.020.001);
Attach3DTextLabelToPlayer(PlayerLabel[playerid], playerid0.00.00.3); 



Re: 3d label - crukk11 - 12.06.2017

anyone


Re: 3d label - AfiqIqbal - 12.06.2017

Put this under OnPlayerConnect
Code:
if(IsPlayerAdmin(playerid))
{
      format(string,sizeof(string),"[Admin] %s",pName(playerid)); 
      PlayerLabel[playerid] = Create3DTextLabel(string, COLOR, 0.0, 0.0, 0.0, 20.0, 0, 1); 
      Attach3DTextLabelToPlayer(PlayerLabel[playerid], playerid, 0.0, 0.0, 0.3); 
}
Try this, not tested yet.

P/S : If you have custom admin system, you can change the IsPlayerAdmin to your admin system variable.


Re: 3d label - crukk11 - 12.06.2017

i got this error

Quote:

C:\Users\cyber\Desktop\New Text Document.txt(2631) : warning 202: number of arguments does not match definition
C:\Users\cyber\Desktop\New Text Document.txt(2631) : warning 202: number of arguments does not match definition
C:\Users\cyber\Desktop\New Text Document.txt(2632) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

PHP Code:
if(IsPlayerAdmin(playerid))
            {        
                new 
string[128]; 
                new 
Text3D:PlayerLabel[MAX_PLAYERS];
                new 
pName[MAX_PLAYER_NAME];
                
GetPlayerName(playerid,pName,sizeof(pName));
                
format(string,sizeof(string),"[Admin] %s"GetPlayerName(playerid)); 
                
PlayerLabel[playerid] = Create3DTextLabel(stringred0.00.00.020.001); 
                
Attach3DTextLabelToPlayer(PlayerLabel[playerid], playerid0.00.00.3);  
            } 



Re: 3d label - crukk11 - 12.06.2017

fixed.i have one question

if i one use dialog,the dialog buy button show animation actor when click it

PHP Code:
Dialog_Show(playeridshopDIALOG_STYLE_LIST"{00FF00}Category 1 (Weapons, Health, Armour and Money){FFFFFF}""Gun Pack 1 \n Gun Pack 2 \n Gun Pack 3 ""Buy""Closed"); 
how to make that


Re: 3d label - AfiqIqbal - 12.06.2017

Quote:
Originally Posted by crukk11
View Post
fixed.i have one question

if i one use dialog,the dialog buy button show animation actor when click it

PHP Code:
Dialog_Show(playeridshopDIALOG_STYLE_LIST"{00FF00}Category 1 (Weapons, Health, Armour and Money){FFFFFF}""Gun Pack 1 \n Gun Pack 2 \n Gun Pack 3 ""Buy""Closed"); 
how to make that
What do you mean by that? When you buy a gun, then the player makes an animation?

If so, then you have to put ApplyAnimation in OnDialogResponse function.


Re: 3d label - crukk11 - 14.06.2017

the 3d label not working when i log in
i use rcon login to login


Re: 3d label - Whatname - 14.06.2017

-REMOEVED-


Re: 3d label - crukk11 - 14.06.2017

you mean put the code to onrconloginattempt


Re: 3d label - Whatname - 14.06.2017

-REMOVED-


Re: 3d label - Whatname - 14.06.2017

Ohh wait I thought you wanted to attach label only to admins


Re: 3d label - crukk11 - 14.06.2017

ok thank. i have question, how to make if admin login with rcon or auto when he spawn.the score or etc will save.only admin


Re: 3d label - crukk11 - 14.06.2017

yes i want to attach to admin.why?


Re: 3d label - AfiqIqbal - 14.06.2017

Quote:
Originally Posted by crukk11
View Post
ok thank. i have question, how to make if admin login with rcon or auto when he spawn.the score or etc will save.only admin
You have to make an Admin variable in your script first, I suggest you to use Y_ini to make a saving system. Then you can start making it. Read this (https://sampforum.blast.hk/showthread.php?tid=273088)

EDIT: Please read the tutorial first, do not try to copy it without understanding the function. Read the text!


Re: 3d label - crukk11 - 16.06.2017

why i login using rcon the 3d label cannot see.all player cannot see


Re: 3d label - Abagail - 16.06.2017

Quote:
Originally Posted by crukk11
View Post
you mean put the code to onrconloginattempt
Exactly. Show the label once they login, there's more information on it in the wiki. Don't expect us to do everything for you.

https://sampwiki.blast.hk/wiki/OnRconLoginAttempt


Re: 3d label - crukk11 - 16.06.2017

bump