16.02.2015, 19:16
Quote:
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:
|
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; }