27.07.2016, 10:19
How can I add textdraw on the player's head, when he uses /helperduty ?
format(string, sizeof(string), "%s used goto on you.", GetAdminName(playerid)); format(str1, sizeof(str1), "%s used goto on %s.", GetAdminName(playerid), PlayerName(targetid));
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;
}