Help with superid command
#1

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;
}
Reply


Messages In This Thread
Help with superid command - by Nabster - 28.02.2015, 05:23
Re: Help with superid command - by Nabster - 01.03.2015, 02:22
Re: Help with superid command - by Nabster - 02.03.2015, 02:09
AW: Help with superid command - by Nero_3D - 02.03.2015, 02:44

Forum Jump:


Users browsing this thread: 3 Guest(s)