SetObjectMaterialText & Entering a Building - 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: SetObjectMaterialText & Entering a Building (
/showthread.php?tid=562706)
SetObjectMaterialText [Solved] & Entering a Building -
Zmith - 11.02.2015
[Solved]
Entering a Building
I want a automatic entrance and exit to buildings such as this ammunation. Basically if you enter the icon/short area you'll be teleported into the building just like single player.
Код:
2124.0105,-1185.6470,24.0198,270.0499,0,0,0,0,0,0); // ENTRANCE - ARROW OUTSIDE
2126.8274,-1185.6943,24.0335,90.4607,0,0,0,0,0,0); // EXIT - INTERIOR
Re: SetObjectMaterialText & Entering a Building -
CalvinC - 11.02.2015
For a transparent background, you can just use an invisible object and put text on that, try using 19482.
Use a timer that loops through all players and checks if they're at those coordinates with IsPlayerInRangeOfPoint.
Re: SetObjectMaterialText & Entering a Building -
Zmith - 11.02.2015
Код:
new objectid = CreateObject(19482, 2124.47778, -1192.18567, 25.23260, 0.00000, 0.00000, 180.00000);
SetObjectMaterialText(objectid, "{132685}AMMU-NATION", 0, OBJECT_MATERIAL_SIZE_256x128,
"sans-serif", 40, 1, 0xFFFF8200, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
Re: SetObjectMaterialText & Entering a Building -
CalvinC - 11.02.2015
Oh nevermind, you're using OBJECT_MATERIAL_TEXT_ALIGN_CENTER as the background color.
pawn Код:
SetObjectMaterialText(objectid, "{132685}AMMU-NATION", 0, OBJECT_MATERIAL_SIZE_256x128,
"sans-serif", 40, 1, 0xFFFF8200, 0, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
Try this.
Re: SetObjectMaterialText & Entering a Building -
Zmith - 11.02.2015
Works! Thanks, CalvinC!
Re: SetObjectMaterialText & Entering a Building -
Zmith - 11.02.2015
I've solved all issues.. thanks xd