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
#2

What exactly happens if you su somebody who already have this 3d-text?
Spreche auch deutsch das englische forum ist aber besser
Reply
#3

Hey, es ьberlappt sich.

Hey, the new Overlay goes "over" the old one, so the "Victim" have 2 Overlays.
Reply
#4

hmm ok
what about:
UpdatePlayer3DTextLabelText
Reply
#5

Dont work also. Ive tried it, but same there. It wont work. So ive tried it with Delete.
Reply
#6

and if you do it with Create3DTextLabel and then Attach3DTextLabelToPlayer
Reply
#7

but then, every one can see the overlay. but only cops should see it
Reply
#8

ah ok
well i will have a look tomorrow so far bye
Reply
#9

Does someone know how to fix it ?
Reply
#10

PUSH, does somebody know how it works ?
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)