How to add textdraw on player's head? -
Zeus666 - 27.07.2016
How can I add textdraw on the player's head, when he uses /helperduty ?
Re: Expected ; found , -
Konstantinos - 27.07.2016
Код:
format(string, sizeof(string), "%s used goto on you.", GetAdminName(playerid));
format(str1, sizeof(str1), "%s used goto on %s.", GetAdminName(playerid), PlayerName(targetid));
Re: How to add textdraw on player's head? -
Zeus666 - 27.07.2016
Thank you Konstantionos.
Now I changed the topic for another question, I can't figure it out
Re: How to add textdraw on player's head? - Quinncell - 27.07.2016
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.
Re: How to add textdraw on player's head? -
Zeus666 - 27.07.2016
How do I know X, Y, Z coordonates from the player's head?
Re: How to add textdraw on player's head? - Quinncell - 27.07.2016
The tutorial is for /aduty but you get the idea
https://sampforum.blast.hk/showthread.php?tid=351068
Re: How to add textdraw on player's head? -
Zeus666 - 27.07.2016
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?
Re: How to add textdraw on player's head? - Quinncell - 27.07.2016
I can't find a flaw so I am guessing it's good. (it might not be but I am not seeing any problems)
Re: How to add textdraw on player's head? -
Zeus666 - 27.07.2016
error 017: undefined symbol "adutyduty"
error 017: undefined symbol "helpduty"
hmm
Re: How to add textdraw on player's head? - Quinncell - 27.07.2016
Where is the "adutyduty" and "helpduty" located at?