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(playerid, params[])
{
    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", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    
Attach3DTextLabelToPlayer(helpduty, playerid, 0.0, 0.0, 0.7);
        
pInfo[playerid][pHelperDuty] = 1;
        new 
string[128];
        
GetPlayerName(playerid, string, 24);
        
format(string, sizeof(string), "{FF0000} %s is now helperdutyr" ,string);
        
SendClientMessageToAll(-1, string);
    }
    else
    {
        
SetPlayerColor(playerid, COLOR_WHITE);
          
DeletePlayer3DTextLabel(playerid,helpduty);
        
pInfo[playerid][pHelperDuty] = 0;
        new 
str[76], name[24];
        
GetPlayerName(playerid, name, 24);
        
format(str, sizeof(str), "{FF0000}%s no more helperduty", name);
        
SendClientMessageToAll(COLOR_GREEN, str);
    }
    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)