3dtextlabel
#1

why the 3dtextlabel is not deleted after he get off duty

Код HTML:
CMD:hod(playerid, params[])
{
    if(gLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_ERROR, "Tu nu esti logat si nu poti sa folosesti aceasta comanda!");
    if(PlayerInfo[playerid][pGamingPerk] == 0) return SendClientMessage(playerid, COLOR_ERROR, "Nu ai acces la aceasta comanda!");
	if (PlayerInfo[playerid][pHelper] >= 1)
	{
	    new Text3D:onduty = Create3DTextLabel("Helper On-Duty", COLOR_LIGHTGREEN, 30.0, 40.0, 50.0, 40.0, 0);
	    if(HelperDuty[playerid] == 1)
		{
   			HelperDuty[playerid] = 0;
   			Delete3DTextLabel(Text3D:onduty);
   			SendClientMessage(playerid, COLOR_SYN, "(!) {FFFFFF}Acum nu mai esti disponibil in calitate de helper, nu o sa mai primesti intrebari din partea incepatorilor.");
        }
		else
		{
		    format(gString, sizeof(gString), "Helperul {B8DBFF}%s {FFFFFF}este disponibil. Foloseste {B8DBFF}/sms {FFFFFF}sau {B8DBFF}/n {FFFFFF}daca doresti ajutor.",GetName(playerid),playerid);
			SendClientMessageToAll(COLOR_WHITE,gString);
			HelperDuty[playerid] = 1;
			Attach3DTextLabelToPlayer(Text3D:onduty, playerid, 0.0, 0.0, 0.5);
			SendClientMessage(playerid, COLOR_SYN, "(!) {FFFFFF}Acum esti la datorie in calitate de helper, o sa primesti intrebari din partea incepatorilor.");
		}
	}
	else
	{
	    SendClientMessage(playerid,COLOR_ERROR,"Nu esti helper !");
	}
	return 1;
}
Reply
#2

Your code should be

PHP код:
DeletePlayer3DTextLabel(playerid,Text3D:onduty); 
instead

PHP код:
Delete3DTextLabel(Text3D:onduty); 
You were creating a 3d text label only for a specific player.

https://sampwiki.blast.hk/wiki/CreatePlayer3DTextLabel
https://sampwiki.blast.hk/wiki/DeletePlayer3DTextLabel
https://sampwiki.blast.hk/wiki/Delete3DTextLabel
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)