18.02.2015, 13:30
(
Последний раз редактировалось Nabster; 18.02.2015 в 13:41.
Причина: FIXED
)
getting tag mismatch error on attach3dtext
Код:
CMD:adminduty(playerid,params[])
{
new string[128],pName[MAX_PLAYER_NAME];
new Float:X, Float:Y, Float:Z;
new PlayerText3D:admintextid;
if(PInfo[playerid][Level] < 1)
return SendClientMessage(playerid,STEALTH_BLUE,"You need to be level 1 to go on admin duty.");
CMDMessageToAdmins(playerid,"ADMINDUTY");
if(PInfo[playerid][God] == 0)
{
PInfo[playerid][God] = 1;
SetPlayerHealth(playerid,100000);
SetPlayerSkin(playerid,217);
ResetPlayerWeapons(playerid);
GetPlayerName(playerid,pName,sizeof pName);
format(string,sizeof(string),"Administrator %s is now on Admin Duty.",pName);
SendClientMessageToAll(COLOR_MENUHIGHLIGHT,string);
admintextid = CreatePlayer3DTextLabel(playerid,"!!ADMIN ON DUTY!!",COLOR_GREEN,X,Y,Z,40.0);
Attach3DTextLabelToPlayer(admintextid, playerid, 0.0, 0.0, 0.7);
}
else
{
PInfo[playerid][God] = 0;
GetPlayerName(playerid,pName,sizeof pName);
format(string,sizeof(string),"Administrator %s is now off Admin Duty.",pName);
SendClientMessageToAll(COLOR_MENUHIGHLIGHT,string);
SetPlayerHealth(playerid,0.0);
DeletePlayer3DTextLabel(playerid,admintextid);
}
return 1;
}

