28.02.2015, 05:23
(
Последний раз редактировалось Nabster; 28.02.2015 в 05:50.
Причина: not working
)
well it disables nametag but it don't shows labels..
Код:
CMD:superid(playerid,params[])
{
new string[128],PlayerText3D:Label[MAX_PLAYERS],Float:Pos[4],pName[24];
if(PInfo[playerid][Level] < 4)
return SendClientMessage(playerid,STEALTH_BLUE,"You need to be level 4 to use this command.");
CMDMessageToAdmins(playerid,"SUPERID");
if(PInfo[playerid][Nametag] == 0 && PInfo[playerid][Superid] == 0)
{
PInfo[playerid][Nametag] = 1;
PInfo[playerid][Superid] = 1;
for(new i = 0; i < MAX_PLAYERS; i++)
ShowPlayerNameTagForPlayer(playerid, i, false);
SendClientMessage(playerid,COLOR_LIMEGREEN,"SUPERID ON");
for(new i = 0; i < MAX_PLAYERS; i++)
{
GetPlayerPos(i, Pos[1], Pos[2], Pos[3]);
GetPlayerName(i,pName,sizeof pName);
format(string,sizeof(string),"%s(%i)",pName,i);
CreatePlayer3DTextLabel(i,string,COLOR_INDIANRED, Pos[0], Pos[1], Pos[2], 200.0, -1, 1);
}
}
else
{
PInfo[playerid][Nametag] = 0;
PInfo[playerid][Superid] = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
ShowPlayerNameTagForPlayer(playerid, i, true);
SendClientMessage(playerid,COLOR_INDIANRED,"SUPERID OFF");
for(new i = 0; i < MAX_PLAYERS; i++)
{
DeletePlayer3DTextLabel(i,PlayerText3D:Label[i]);
}
}
return 1;
}

