SetObjectMaterialText help
#1

Can somebody tell me what did I do wrong here? I am trying to spray a gang tag, but the object doesnt appear IG. I mean it does, but I can't see it.

Код:
else if(GangInfo[playerid][Gang] == 9)
	    {
    		new LSVTAG = CreateObject(19355, 2519.6245, -1668.4929, 15.5601, 0.0000, 0.0000, 1.2568);
			SetObjectMaterialText(LSVTAG, "ESGV XXII", 0, 50, "Arial Black", 24, 0, -256, 0, 1);
		    for(new stags = Tag; stags < MAX_TAGS; stags++)
	        {
	       		if (Tag >= MAX_TAGS-1) return SendClientMessage(playerid,COLOR_RED,"You can no longer spray tags because there are too many tags.");
	    		new Float:X, Float:Y, Float:Z,Float:A,name[24];
				GetPlayerPos(playerid, X, Y, Z);
				GetPlayerFacingAngle(playerid, A);
				GetPlayerName(playerid,name,24);
				X += (1 * floatsin(-A, degrees));
				Y += (1 * floatcos(-A, degrees));
				TagInfo[stags][tgX] = X;
    			TagInfo[stags][tgY] = Y;
    			TagInfo[stags][tgZ] = Z;
				Sprayed[playerid] = 1;
				Tag += 1;
    			Spray[stags] = CreateObject(LSVTAG, X, Y, Z, 0.0, 0.0, A+90);
    			GameTextForPlayer(playerid,"~0x99FFFFAA~Sprayed!",3000,3);
    			PlayerPlaySound(playerid,1057,0,0,0);
    			strmid(TagInfo[stags][tgSprayer], name, 0, strlen(name),128);
    			printf("[TAG] %s - %d",TagInfo[stags][tgSprayer],stags);
    			break;
			}
		}
P..S. If I #define the object instead of the createobject line, it does appear IG, but the SetObjectMaterialText line doesn't work on it, just a wall appearing
Reply
#2

Please guys help, I think I am close to solve this, tho I don't know where to put the SetOBjectMaterialText line and maybe there is another way to define it.

I defined the CreateObject line on top of the script as #define LSVTAG 19355
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)