[POMOC]3d text iznad glave


Započeo Kopra, Mart 12, 2012, 10:27:56 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Evo uradi ovako i mora raditi hehe :D

Prvo dodas ovo gde su ti ostali new-ovi:

new Text3D:AdminDuty[MAX_PLAYERS];
new ADuty[MAX_PLAYERS] = 0;


zatim zameni svoje komande za admin duznost sa ovime evo:

if(strcmp(cmd, "/aon", true) == 0)
{
	if(IsPlayerConnected(playerid))
	{
	    if(PlayerInfo[playerid][pAdmin] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "*Nemate ovlasti da koristite ovu komandu!");
	    if(ADuty[playerid] == 1) return SendClientMessage(playerid, COLOR_GRAD1, "*Vec ste na duznosti!");
		SetPlayerHealth(playerid, 150);
		SetPlayerArmour(playerid, 150);
		SendClientMessage(playerid, COLOR_YELLOW, "*Upalio si admin duznost!");
		ADuty[playerid] = 1;
		if(PlayerInfo[playerid][pAdmin] >= 1 && PlayerInfo[playerid][pAdmin] < 5)
		{
		    AdminDuty[playerid] = Create3DTextLabel("[ADMIN]",0xFF0000AA,0,0,0,20,0,1);
			Attach3DTextLabelToPlayer(AdminDuty[playerid], playerid, 0, 0, 0.6);
			return 1;
		}
		if(PlayerInfo[playerid][pAdmin] == 1337)
		{
		    AdminDuty[playerid] = Create3DTextLabel("[HEAD ADMIN]",0xFF0000AA,0,0,0,20,0,1);
			Attach3DTextLabelToPlayer(AdminDuty[playerid], playerid, 0, 0, 0.6);
			return 1;
		}
		if(PlayerInfo[playerid][pAdmin] == 1338)
		{
		    AdminDuty[playerid] = Create3DTextLabel("[SCRIPTER]",0xFF0000AA,0,0,0,20,0,1);
			Attach3DTextLabelToPlayer(AdminDuty[playerid], playerid, 0, 0, 0.6);
			return 1;
		}
		if(PlayerInfo[playerid][pAdmin] == 1339)
		{
		    AdminDuty[playerid] = Create3DTextLabel("[SUVLASNIK]",0xFF0000AA,0,0,0,20,0,1);
			Attach3DTextLabelToPlayer(AdminDuty[playerid], playerid, 0, 0, 0.6);
			return 1;
		}
		if(PlayerInfo[playerid][pAdmin] == 1340)
		{
		    AdminDuty[playerid] = Create3DTextLabel("[VLASNIK]",0xFF0000AA,0,0,0,20,0,1);
			Attach3DTextLabelToPlayer(AdminDuty[playerid], playerid, 0, 0, 0.6);
			return 1;
		}
	}
	return 1;
}

if(strcmp(cmd, "/aoff", true) == 0)
{
	if(IsPlayerConnected(playerid))
	{
	    if(PlayerInfo[playerid][pAdmin] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "*Nemate ovlasti da koristite ovu komandu!");
	    if(ADuty[playerid] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "*Vi niste na duznosti!");
		SetPlayerHealth(playerid, 100);
		SetPlayerArmour(playerid, 0);
		SendClientMessage(playerid, COLOR_GREEN, "*Iskljucio si admin duznost!");
		ADuty[playerid] = 0;
		Delete3DTextLabel(AdminDuty[playerid]);
	}
	return 1;
}


i na kraju pod onPlayerDisconnect dodaj:

Delete3DTextLabel(AdminDuty[playerid]);


Ako ima greska javi zato sto sam sad pisao haha :D