SA-MP Forums Archive
Attaching symbol to vehicle - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Attaching symbol to vehicle (/showthread.php?tid=605370)



Attaching symbol to vehicle - SwagMate - 18.04.2016

Hello is there any Filter Script, that can help to add symbol + on rancher, as I will be using it as medics car lol xD All I want to to is attach 3d text to vehicle hood, and I have no idea what the coordinates are :/ Any suggestions?


Re: Attaching symbol to vehicle - ATomas - 18.04.2016

Attach object and use AttachObjectToVehicle. In text editor you find font style hned symbil is, and use like character in object


Re: Attaching symbol to vehicle - Threshold - 18.04.2016

https://sampwiki.blast.hk/wiki/CreateObject
https://sampwiki.blast.hk/wiki/SetObjectMaterialText
https://sampwiki.blast.hk/wiki/AttachObjectToVehicle

I believe there is a symbol under the font 'Webdings' that should meet your requirements.


Re: Attaching symbol to vehicle - Saliim - 18.04.2016

Hi, so, you can use that :
with your variable add new variable for your vehicle example :
Код:
new salim;
and
Код:
new Text3D:label[MAX_PLAYERS];
after in OnGameModeInit add that
Код:
public OnGameModeInit()
{
salim = CreateVehicle(415,1988.4868,-1674.2389,14.5279,269.3642,193,193,120);// your car identified
return 1;
}
if you wan't add a plate add that in OnGameModeInit
Код:
SetVehicleNumberPlate(salim, "{FF0000}Salim");
after in
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
	new Text3D:salim3D = Create3DTextLabel("Car Of Salim", 0x00FF40FF, 30.0, 40.0, 50.0, 40.0, 0);

	if(newstate == PLAYER_STATE_DRIVER)
	{
	    if(vehicleid == salim) // here name of car identified in ongamemodeinit
	    {

    		Attach3DTextLabelToVehicle(salim3D, salim, 0.0, 0.0, 0.7);
        	}
		if(strcmp(pname, "Salim", true) == 0) //here your surname in game
	        {

	        	return 1;
        	}
        	else
        	{
        	    RemovePlayerFromVehicle(playerid);
        	    SendClientMessage(playerid, COLOR_RED, "Sorry, it's the vehicle of Salim");
        	}
            }
	}
}
return 1;
}