3d label
#1

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); 
Reply
#2

anyone
Reply
#3

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.
Reply
#4

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);  
            } 
Reply
#5

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
Reply
#6

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.
Reply
#7

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

-REMOEVED-
Reply
#9

you mean put the code to onrconloginattempt
Reply
#10

-REMOVED-
Reply
#11

Ohh wait I thought you wanted to attach label only to admins
Reply
#12

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
Reply
#13

yes i want to attach to admin.why?
Reply
#14

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!
Reply
#15

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

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
Reply
#17

bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)