CreatePlayer3DTextLabel wont work
#1

Hello, i want to see an "Overlay" over the Head from a Person which have Wanteds. Like: "Name: ... Wanteds: ... Reason: ... " It works fine, only my "Update" funktion won't work and i dont know why. (( Sorry for my bad english. ))

Here my Code:

Код:
ocmd:su(playerid,params[])
{
	if(IsACop(playerid) != 1) return SCM(playerid,COLOR_FADE2,"Du bist nicht befugt, diesen Befehl zu nutzen.");
	new giveplayer,reason[128];
	if(sscanf(params,"us",giveplayer,reason)) return SCM(playerid,COLOR_FADE2,"Benutze: /su [PLAYER] [REASON]");
	setcrime(giveplayer,1,reason,PlayerInfo[playerid][pName]);
	format(LastReason[giveplayer],256,"%s",reason);
	new string[128];
	format(string,sizeof(string),"[ %d ] %s\nWantedLevel: %d\nGrund: %s",giveplayer,PlayerInfo[giveplayer][pName],PlayerInfo[giveplayer][pWanteds],LastReason[giveplayer]);
	if(HaveWantedText[giveplayer] == 0)
	{
		for(new i=0;i<MAX_PLAYERS;i++)
		{
			if(PlayerInfo[i][pFraktion] == 0 || PlayerInfo[i][pFraktion] == 1 || PlayerInfo[i][pFraktion] == 2)
			{
				WantedText[giveplayer] = CreatePlayer3DTextLabel(i,string,0xEE0000FF, 0.0, 0.0, 0.5, 60.0,giveplayer, INVALID_VEHICLE_ID, 0); <====== WORK
				HaveWantedText[giveplayer] = 1;
			}
		}
	}
	if(HaveWantedText[giveplayer] == 1)
	{
		for(new i=0;i<MAX_PLAYERS;i++)
		{
			if(PlayerInfo[i][pFraktion] == 0 || PlayerInfo[i][pFraktion] == 1 || PlayerInfo[i][pFraktion] == 2)
			{
				DeletePlayer3DTextLabel(i,WantedText[giveplayer]); // <========= DONT WORK 
				WantedText[giveplayer] = CreatePlayer3DTextLabel(i,string,0xEE0000FF, 0.0, 0.0, 0.5, 60.0,giveplayer, INVALID_VEHICLE_ID, 0); // <====== WORK
			}
		}
	}
	return 1;
}
Reply


Messages In This Thread
CreatePlayer3DTextLabel wont work - by Sean.H - 01.07.2012, 20:00
AW: CreatePlayer3DTextLabel wont work - by LeOsk - 01.07.2012, 20:08
AW: CreatePlayer3DTextLabel wont work - by Sean.H - 01.07.2012, 20:10
AW: CreatePlayer3DTextLabel wont work - by LeOsk - 01.07.2012, 20:21
AW: CreatePlayer3DTextLabel wont work - by Sean.H - 01.07.2012, 20:27
AW: CreatePlayer3DTextLabel wont work - by LeOsk - 01.07.2012, 20:36
AW: CreatePlayer3DTextLabel wont work - by Sean.H - 01.07.2012, 20:46
AW: CreatePlayer3DTextLabel wont work - by LeOsk - 01.07.2012, 20:50
AW: CreatePlayer3DTextLabel wont work - by Sean.H - 02.07.2012, 10:54
AW: CreatePlayer3DTextLabel wont work - by Sean.H - 02.07.2012, 17:36

Forum Jump:


Users browsing this thread: 2 Guest(s)