SetPlayerObjectMaterialText help
#1

I wanna make with SetPlayerObjectMaterialText to show player class behind of player, I put the object and player pos close to object but MaterialText don't work, no errors, no warnings

Here's the code
Код:
public OnPlayerRequestClass(playerid, classid)
{
 	SetPlayerPos(playerid,-2667.84229, -299.69055, 16.93143);
	SetPlayerFacingAngle(playerid,320.9217);
	SetPlayerCameraPos(playerid, -2661.2222, -293.6193, 20.5209);
	SetPlayerCameraLookAt(playerid, -2661.9329, -294.3244, 20.4807);

	spawnobjekt = CreateObject(19353, -2670.07764, -301.65512, 20.69875,   0.00000, 0.00000, 45.48000);

	switch (classid)
	{
		case 0, 1, 2: // Classes that will be truckdrivers
		{

			SetPlayerObjectMaterialText(playerid, spawnobjekt, "Class 1", 0, OBJECT_MATERIAL_SIZE_256x128,"Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
			// Display the name of the class
                       GameTextForPlayer(playerid, TXT_ClassTrucker, 5000, 4);
            
			// Store the class for the player (truckdriver)
			APlayerData[playerid][PlayerClass] = ClassTruckDriver;
		}
		case 3, 4: // Classes that will be bus-drivers
		{
			// Display the name of the class
                        GameTextForPlayer(playerid, TXT_ClassBusDriver, 5000, 4);
                        SetPlayerObjectMaterialText(playerid, spawnobjekt, "Class 2", 0, OBJECT_MATERIAL_SIZE_256x128,"Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
			APlayerData[playerid][PlayerClass] = ClassBusDriver;
		}
.
.
.
EDIT: FIXED CreateObject must be CreatePlayerObject
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)