How to add textdraw on player's head?
#1

How can I add textdraw on the player's head, when he uses /helperduty ?
Reply
#2

Код:
format(string, sizeof(string), "%s used goto on you.", GetAdminName(playerid)); 
format(str1, sizeof(str1), "%s used goto on %s.", GetAdminName(playerid), PlayerName(targetid));
Reply
#3

Thank you Konstantionos.

Now I changed the topic for another question, I can't figure it out
Reply
#4

Uhm I am pretty certain thats not a texrdaw, it's a 3DTextLabel.
Read this: https://sampwiki.blast.hk/wiki/Attach3DTextLabelToPlayer
and lookup some tutorials about it.
Reply
#5

How do I know X, Y, Z coordonates from the player's head?
Reply
#6

The tutorial is for /aduty but you get the idea
https://sampforum.blast.hk/showthread.php?tid=351068
Reply
#7

PHP код:
CMD:helperduty(playeridparams[])
{
    if (
pInfo[playerid][Helper] < 1)
        return 
SendClientMessage(playerid,COLOR_WHITE"U aint helper.");
    if (!
pInfo[playerid][pHelperDuty])
    {
        
SetPlayerColor(playerid,COLOR_GREEN);
      new 
Text3D:label Create3DTextLabel("HELPER DUTY - DON'T SHOOT"0x008080FF30.040.050.040.00);
    
Attach3DTextLabelToPlayer(helpdutyplayerid0.00.00.7);
        
pInfo[playerid][pHelperDuty] = 1;
        new 
string[128];
        
GetPlayerName(playeridstring24);
        
format(stringsizeof(string), "{FF0000} %s is now helperdutyr" ,string);
        
SendClientMessageToAll(-1string);
    }
    else
    {
        
SetPlayerColor(playeridCOLOR_WHITE);
          
DeletePlayer3DTextLabel(playerid,helpduty);
        
pInfo[playerid][pHelperDuty] = 0;
        new 
str[76], name[24];
        
GetPlayerName(playeridname24);
        
format(strsizeof(str), "{FF0000}%s no more helperduty"name);
        
SendClientMessageToAll(COLOR_GREENstr);
    }
    return 
1;

is that good?
Reply
#8

I can't find a flaw so I am guessing it's good. (it might not be but I am not seeing any problems)
Reply
#9

error 017: undefined symbol "adutyduty"
error 017: undefined symbol "helpduty"

hmm
Reply
#10

Where is the "adutyduty" and "helpduty" located at?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)