[HELP] Problem with label for Admin.
#6

Quote:
Originally Posted by xVIP3Rx
View Post
Do you wanna attach it to somebody or just put it somewhere, You don't use "Attach3DTextLabelToPlayer", You'll have to change "INVALID_PLAYER_ID" to an id;

pawn Code:
CreateDynamic3DTextLabel("ADMINISTRATOR NA DUZNOSTI", COLOR_ORANGE, x, y, z, 30, /*adminid/playerid that you want it attached to*/,  INVALID_VEHICLE_ID, 1);
this is command for all admins. i want make for all admins, not for special playerid.


cmd is:
Code:
CMD:aon(playerid)
{
    if(IsLogged[playerid] == false) return SendClientMessage(playerid, COLOR_RED, ""COL_ORANGE"HF-Protect | "COL_WHITE"Moras biti ulogiran kako bi mogao koristiti "COL_CYAN"komande"COL_RED"!");
	if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_RED, "[GRESKA]: "COL_WHITE"Nemas prava za koristenje ove komande.");
	else
    {
        if (gaDuty[playerid] == false)
        {
            new string[128];
            new Float:health, Float:armour;
            new pName[MAX_PLAYER_NAME];
            new Float:x,Float:y,Float:z;
            aDutyl[playerid] = CreateDynamic3DTextLabel("ADMINISTRATOR NA DUZNOSTI", COLOR_ORANGE, x, y, z, 30, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 30.0);
            //aDutyl[playerid] = CreateDynamic3DTextLabel("ADMINISTRATOR NA DUZNOSTI", COLOR_ORANGE, x, y, z, NAME_DRAWDISTANCE, 0, 1 );

            GetPlayerPos(playerid,x,y,z);

            GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
            format(string,sizeof(string), "[SERVER]: "COL_WHITE"Administrator %s je sada na Admin duznosti.",pName);
            SendClientMessageToAll(COLOR_ORANGE,string);
            SendClientMessage(playerid,COLOR_RED,"[SERVER]: "COL_WHITE"Sada si na Admin duznosti.");
	        GetPlayerHealth(playerid, health);
	        GetPlayerArmour(playerid, armour);
            PlayerInfo[playerid][pHealth] = health;
            PlayerInfo[playerid][pArmour] = armour;
            gaDuty[playerid] = true;
           	SetPlayerHealth(playerid, 999999);
	        SetPlayerArmour(playerid, 999999);
	        SetPlayerColor(playerid, COLOR_ORANGE);
            Attach3DTextLabelToPlayer(aDutyl[playerid],playerid,0.0, 0.0, 0.5);
        }
        else if (gaDuty[playerid] == true)
        {
            new string[128];
            new pName[MAX_PLAYER_NAME];


            GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
            format(string,sizeof(string),"[SERVER]: "COL_WHITE"Administrator %s nije vise na duznosti.",pName);
            SendClientMessageToAll(COLOR_ORANGE,string);
            SendClientMessage(playerid, COLOR_RED,"[SERVER]: "COL_WHITE"Vise nisi na Admin duznosti.");
            gaDuty[playerid] = false;
           	SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
	        SetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]);
	        SetPlayerColor(playerid, COLOR_WHITE);
	        DestroyDynamic3DTextLabel(aDutyl[playerid]);

        }
    }
    return 1;
}
Reply


Messages In This Thread
[HELP] Problem with label for Admin. - by TiXz0r - 16.02.2015, 16:51
Re: [HELP] Problem with label for Admin. - by GGRoleplay - 16.02.2015, 16:55
Re: [HELP] Problem with label for Admin. - by TiXz0r - 16.02.2015, 18:55
Re: [HELP] Problem with label for Admin. - by Extremo - 16.02.2015, 18:59
Re: [HELP] Problem with label for Admin. - by xVIP3Rx - 16.02.2015, 19:02
Re: [HELP] Problem with label for Admin. - by TiXz0r - 16.02.2015, 19:16
Re: [HELP] Problem with label for Admin. - by xVIP3Rx - 16.02.2015, 19:41

Forum Jump:


Users browsing this thread: 1 Guest(s)