3d text not deleting (help me)
#1

why at this cmd. the 3d text label is not deleting?

i add the Delete3DLabelText still not works. and every players connect/disconnect they have that Admin Label at their head. Its really deleting

HELP ME!

Код:
CMD:aduty(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, -1, "This is an admin only command!");
	{
	    //if(PlayerInfo[playerid][pAdminNameSet] == 1)
	    //{
			if(PlayerInfo[playerid][pAdminDuty] == 0)
				{

					SendClientMessageEx(playerid, COLOR_YELLOW, "You are now on administrative duty! Remember to check /reports!");
					PlayerInfo[playerid][pAdminDuty] = 1;
					SetPlayerHealth(playerid, 100000);
					SetPlayerArmour(playerid, 100000);
					SetPlayerColor(playerid, COLOR_REALRED);
					//SetPlayerSkin(playerid, 294); - Commented by Voltage
					//AdminLabel[playerid] = Create3DTextLabel("{FFFF00}Admininstrator ON Duty\n{FF0000}Do not attack!",0x008080FF,30.0,40.0,50.0,40.0,0);
					AdminLabel[playerid] = CreateDynamic3DTextLabel("{FFFF00}Administrator on duty!\n{FF1515}Do not Attack!", 0xF600F6FF, 0, 0, -20, 25, playerid);
					Streamer_SetFloatData(STREAMER_TYPE_3D_TEXT_LABEL, AdminLabel[playerid] , E_STREAMER_ATTACH_OFFSET_Z, 0.25);
		  			Attach3DTextLabelToPlayer(AdminLabel[playerid], playerid, 0.0, 0.0, 0.7);
					//strcat(NormalName[playerid], GetPlayerNameEx(playerid));
					//SetPlayerName(playerid, PlayerInfo[playerid][pAdminName]);
					new string[128];
					format(string, sizeof(string), "Administrator %s(ID %d) is now on Admin Duty!", GetPlayerNameEx(playerid), playerid);
					ABroadCast(COLOR_YELLOW, string, 1);
				}
				else
				{
					SendClientMessageEx(playerid, COLOR_RED, "You are now off admin duty!");
					//SetPlayerName(playerid, PlayerInfo[playerid][pNormalName]);
				 	Delete3DTextLabel(AdminLabel[playerid]);
					SetPlayerHealth(playerid, 100);
					SetPlayerArmour(playerid, 0);
					SetPlayerToTeamColor(playerid);
					//SetPlayerSkin(playerid, 299); - Commented by Voltage
					PlayerInfo[playerid][pAdminDuty] = 0;
					new string[128];
					format(string, sizeof(string), "Administrator %s(ID %d) is now Off Admin Duty! ( Leave the Admin to Roleplay )", GetPlayerNameEx(playerid), playerid);
					ABroadCast(COLOR_YELLOW, string, 1);
				}
		//} else return SendClientMessage(playerid, COLOR_WHITE, "You don't have an admin name yet! Contact Server Owner to set your admin name!");
	}
	return 1;
}
Reply
#2

Sorry about this.. i dont know how to put it in a code

Remove this

//AdminLabel[playerid] = Create3DTextLabel("{FFFF00}Admininstrator ON Duty\n{FF0000}Do not attack!",0x008080FF,30.0,40.0,50.0,40.0,0);
AdminLabel[playerid] = CreateDynamic3DTextLabel("{FFFF00}Administrator on duty!\n{FF1515}Do not Attack!", 0xF600F6FF, 0, 0, -20, 25, playerid);
Streamer_SetFloatData(STREAMER_TYPE_3D_TEXT_LABEL, AdminLabel[playerid] , E_STREAMER_ATTACH_OFFSET_Z, 0.25);
Attach3DTextLabelToPlayer(AdminLabel[playerid], playerid, 0.0, 0.0, 0.7);

And this

Delete3DTextLabel(AdminLabel[playerid]);
Reply
#3

Quote:
Originally Posted by SupaFool
Посмотреть сообщение
Sorry about this.. i dont know how to put it in a code

Remove this

//AdminLabel[playerid] = Create3DTextLabel("{FFFF00}Admininstrator ON Duty\n{FF0000}Do not attack!",0x008080FF,30.0,40.0,50.0,40.0,0);
AdminLabel[playerid] = CreateDynamic3DTextLabel("{FFFF00}Administrator on duty!\n{FF1515}Do not Attack!", 0xF600F6FF, 0, 0, -20, 25, playerid);
Streamer_SetFloatData(STREAMER_TYPE_3D_TEXT_LABEL, AdminLabel[playerid] , E_STREAMER_ATTACH_OFFSET_Z, 0.25);
Attach3DTextLabelToPlayer(AdminLabel[playerid], playerid, 0.0, 0.0, 0.7);

And this

Delete3DTextLabel(AdminLabel[playerid]);
Are you noob?
Reply
#4

PHP код:
    if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, -1"This is an admin only command!");
    { 
WTF Is That?! !!!!!!
You Returned It And Then You Make " {} " ?! !! !
Change It To This ! :
PHP код:

CMD
:aduty(playeridparams[])
{
     if(
PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, -1"This is an admin only command!");
        
//if(PlayerInfo[playerid][pAdminNameSet] == 1)
        //{
     
if(PlayerInfo[playerid][pAdminDuty] == 0)
     {
                    
SendClientMessageEx(playeridCOLOR_YELLOW"You are now on administrative duty! Remember to check /reports!");
                    
PlayerInfo[playerid][pAdminDuty] = 1;
                    
SetPlayerHealth(playerid100000);
                    
SetPlayerArmour(playerid100000);
                    
SetPlayerColor(playeridCOLOR_REALRED);
                    
//SetPlayerSkin(playerid, 294); - Commented by Voltage
                    //AdminLabel[playerid] = Create3DTextLabel("{FFFF00}Admininstrator ON Duty\n{FF0000}Do not attack!",0x008080FF,30.0,40.0,50.0,40.0,0);
                    
AdminLabel[playerid] = CreateDynamic3DTextLabel("{FFFF00}Administrator on duty!\n{FF1515}Do not Attack!"0xF600F6FF00, -2025playerid);
                    
Streamer_SetFloatData(STREAMER_TYPE_3D_TEXT_LABELAdminLabel[playerid] , E_STREAMER_ATTACH_OFFSET_Z0.25);
                      
Attach3DTextLabelToPlayer(AdminLabel[playerid], playerid0.00.00.7);
                    
//strcat(NormalName[playerid], GetPlayerNameEx(playerid));
                    //SetPlayerName(playerid, PlayerInfo[playerid][pAdminName]);
                    
new string[128];
                    
format(stringsizeof(string), "Administrator %s(ID %d) is now on Admin Duty!"GetPlayerNameEx(playerid), playerid);
                    
ABroadCast(COLOR_YELLOWstring1);
     }
     else
     {
                    
SendClientMessageEx(playeridCOLOR_RED"You are now off admin duty!");
                    
//SetPlayerName(playerid, PlayerInfo[playerid][pNormalName]);
                     
Delete3DTextLabel(AdminLabel[playerid]);
                    
SetPlayerHealth(playerid100);
                    
SetPlayerArmour(playerid0);
                    
SetPlayerToTeamColor(playerid);
                    
//SetPlayerSkin(playerid, 299); - Commented by Voltage
                    
PlayerInfo[playerid][pAdminDuty] = 0;
                    new 
string[128];
                    
format(stringsizeof(string), "Administrator %s(ID %d) is now Off Admin Duty! ( Leave the Admin to Roleplay )"GetPlayerNameEx(playerid), playerid);
                    
ABroadCast(COLOR_YELLOWstring1);
     }
    
//  } else return SendClientMessage(playerid, COLOR_WHITE, "You don't have an admin name yet! Contact Server Owner to set your admin name!");
     
return 1;

I don't think it really help you but i think it will work

Don't Forget MY Rep ! !
Reply
#5

bump
Reply
#6

I feel like we've been over this before.. https://sampforum.blast.hk/showthread.php?tid=506204

When you delete it did you delete the players label too? https://sampwiki.blast.hk/wiki/DeletePlayer3DTextLabel
Reply
#7

Quote:
Originally Posted by (*|Flake|*)
Посмотреть сообщение
I feel like we've been over this before.. https://sampforum.blast.hk/showthread.php?tid=506204

When you delete it did you delete the players label too? https://sampwiki.blast.hk/wiki/DeletePlayer3DTextLabel
First one: Nope thats different to this thread.

Second One:Whats the problem at here?

Код:
C:\Users\Cris\Desktop\0.3z Server\Philippines Roleplay (2014)\gamemodes\PHRP_V1.3.pwn(44495) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Код:
DeletePlayer3DTextLabel(playerid, AdminLabel);
Код:
CMD:aduty(playerid, params[])
{
     if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, -1, "This is an admin only command!");

        //if(PlayerInfo[playerid][pAdminNameSet] == 1)
        //{
     if(PlayerInfo[playerid][pAdminDuty] == 0)
     {

                    SendClientMessageEx(playerid, COLOR_YELLOW, "You are now on administrative duty! Remember to check /reports!");
                    PlayerInfo[playerid][pAdminDuty] = 1;
                    SetPlayerHealth(playerid, 100000);
                    SetPlayerArmour(playerid, 100000);
                    SetPlayerColor(playerid, COLOR_REALRED);
                    //SetPlayerSkin(playerid, 294); - Commented by Voltage
                    //AdminLabel[playerid] = Create3DTextLabel("{FFFF00}Admininstrator ON Duty\n{FF0000}Do not attack!",0x008080FF,30.0,40.0,50.0,40.0,0);
                    AdminLabel[playerid] = CreateDynamic3DTextLabel("{FFFF00}Administrator on duty!\n{FF1515}Do not Attack!", 0xF600F6FF, 0, 0, -20, 25, playerid);
                    Streamer_SetFloatData(STREAMER_TYPE_3D_TEXT_LABEL, AdminLabel[playerid] , E_STREAMER_ATTACH_OFFSET_Z, 0.25);
                    Attach3DTextLabelToPlayer(AdminLabel[playerid], playerid, 0.0, 0.0, 0.7);
                    //strcat(NormalName[playerid], GetPlayerNameEx(playerid));
                    //SetPlayerName(playerid, PlayerInfo[playerid][pAdminName]);
                    new string[128];
                    format(string, sizeof(string), "Administrator %s(ID %d) is now on Admin Duty!", GetPlayerNameEx(playerid), playerid);
                    ABroadCast(COLOR_YELLOW, string, 1);
     }
     else
     {
                    SendClientMessageEx(playerid, COLOR_RED, "You are now off admin duty!");
                    //SetPlayerName(playerid, PlayerInfo[playerid][pNormalName]);
                    DeletePlayer3DTextLabel(playerid, AdminLabel);
                    SetPlayerHealth(playerid, 100);
                    SetPlayerArmour(playerid, 0);
                    SetPlayerToTeamColor(playerid);
                    //SetPlayerSkin(playerid, 299); - Commented by Voltage
                    PlayerInfo[playerid][pAdminDuty] = 0;
                    new string[128];
                    format(string, sizeof(string), "Administrator %s(ID %d) is now Off Admin Duty! ( Leave the Admin to Roleplay )", GetPlayerNameEx(playerid), playerid);
                    ABroadCast(COLOR_YELLOW, string, 1);
     }
    //  } else return SendClientMessage(playerid, COLOR_WHITE, "You don't have an admin name yet! Contact Server Owner to set your admin name!");

     return 1;
}
Reply
#8

THE TEXT IS NOT ACTUALLY DELETING WHEN GOING OFF DUTY ADMIN. IT SHOULD BE REMOVED AND WHEN THEY GO ON DUTY IT SHOULD BE ATTACH..

PLEASE HELP ME. i really need help

THIS IS THE CODES
Код:
Delete3DTextLabel(playerid, AdminLabel[playerid]);
'

Код:
AdminLabel[playerid] = Create3DTextLabel("{FFFF00}Administrator on duty!\n{FF1515}Do not Attack!", 0xF600F6FF, 0, 0, -20, 25, playerid);
                    Streamer_SetFloatData(STREAMER_TYPE_3D_TEXT_LABEL, AdminLabel[playerid] , E_STREAMER_ATTACH_OFFSET_Z, 0.25);
                    Attach3DTextLabelToPlayer(AdminLabel[playerid], playerid, 0.0, 0.0, 0.7);
Код:
CMD:aduty(playerid, params[])
{
     if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, -1, "This is an admin only command!");

        //if(PlayerInfo[playerid][pAdminNameSet] == 1)
        //{
     if(PlayerInfo[playerid][pAdminDuty] == 0)
     {

                    SendClientMessageEx(playerid, COLOR_YELLOW, "You are now on administrative duty! Remember to check /reports!");
                    PlayerInfo[playerid][pAdminDuty] = 1;
                    SetPlayerHealth(playerid, 100000);
                    SetPlayerArmour(playerid, 100000);
                    SetPlayerColor(playerid, COLOR_REALRED);
                    //SetPlayerSkin(playerid, 294); - Commented by Voltage
                    //AdminLabel[playerid] = Create3DTextLabel("{FFFF00}Admininstrator ON Duty\n{FF0000}Do not attack!",0x008080FF,30.0,40.0,50.0,40.0,0);
                    AdminLabel[playerid] = Create3DTextLabel("{FFFF00}Administrator on duty!\n{FF1515}Do not Attack!", 0xF600F6FF, 0, 0, -20, 25, playerid);
                    Streamer_SetFloatData(STREAMER_TYPE_3D_TEXT_LABEL, AdminLabel[playerid] , E_STREAMER_ATTACH_OFFSET_Z, 0.25);
                    Attach3DTextLabelToPlayer(AdminLabel[playerid], playerid, 0.0, 0.0, 0.7);
                    //strcat(NormalName[playerid], GetPlayerNameEx(playerid));
                    //SetPlayerName(playerid, PlayerInfo[playerid][pAdminName]);
                    new string[128];
                    format(string, sizeof(string), "Administrator %s(ID %d) is now on Admin Duty!", GetPlayerNameEx(playerid), playerid);
                    ABroadCast(COLOR_YELLOW, string, 1);
     }
     else
     {
                    SendClientMessageEx(playerid, COLOR_RED, "You are now off admin duty!");
                    //SetPlayerName(playerid, PlayerInfo[playerid][pNormalName]);
                   	Delete3DTextLabel(playerid, AdminLabel[playerid]);
                    SetPlayerHealth(playerid, 100);
                    SetPlayerArmour(playerid, 0);
                    SetPlayerToTeamColor(playerid);
                    //SetPlayerSkin(playerid, 299); - Commented by Voltage
                    PlayerInfo[playerid][pAdminDuty] = 0;
                    new string[128];
                    format(string, sizeof(string), "Administrator %s(ID %d) is now Off Admin Duty! ( Leave the Admin to Roleplay )", GetPlayerNameEx(playerid), playerid);
                    ABroadCast(COLOR_YELLOW, string, 1);
     }
    //  } else return SendClientMessage(playerid, COLOR_WHITE, "You don't have an admin name yet! Contact Server Owner to set your admin name!");

     return 1;
}
SOME SCREENIES
Reply
#9

GUYS PLEASE
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)