The first question should be really really easy to figure with a simple search.
The second reason is a bit more complex, to make signs you will need to decide how you want to make the sign there is two generic styles which will work for you and two creation methods based on those styles.
Styles
1. SetObjectMaterialText() using text background set as a sold color.
2. SetObjectMaterialText() with no background the text is all that shows and background is transparent.
Creation Methods
1. This is the easiest method to achieve however not always the best option as signs make look unrealistic or uninteresting without a background.
2. This method takes more time and more objects, you customize your sign object first (SetObjectMaterial() possibly but not necessary). Next create your sign text and overlay it onto of the sign object you've chosen and you've created a sign.
References
-
https://sampwiki.blast.hk/wiki/SetObjectMaterialText
-
https://sampwiki.blast.hk/wiki/SetObjectMaterial
Examples
These signs are located on Grove street you can't miss them.
pawn Код:
// Sign 1
new SignStyle_1;
new SignStyle_2;
new SignText_2_1;
new SignText_2_2;
SignStyle_1 = CreateObject(3337,2508.669,-1667.180,12.361,-0.000,-0.000,179.999);
SetObjectMaterialText(SignStyle_1, 1, "Grove Street", 130, "Ariel", 80, 0, -65536, -16777216, 1);
SignStyle_2 = CreateObject(3337,2503.726,-1667.668,12.361,-0.000,-0.000,0.000);
SetObjectMaterial(SignStyle_2, 1, 19278, "SkyDivePlatforms", "hazardtile19-2", 0);
SignText_2_1 = CreateObject(19482,2503.847,-1667.594,15.279,-0.000,-0.000,0.000);
SetObjectMaterialText(SignText_2_1, 0, "Construction", 130, "Ariel", 40, 0, -256, 0, 1);
SignText_2_2 = CreateObject(19482,2503.847,-1667.624,15.909,-0.000,-0.000,0.000);
SetObjectMaterialText(SignText_2_2, 0, "ГЎ", 130, "Wingdings", 90, 0, -256, 0, 1);
Final Note
You can integrate this concept into a dynamic sign system quite easily with a few functions.
CreateSign()
DeleteSign()
Check out this script here
https://sampforum.blast.hk/showthread.php?tid=423622 it demonstrates dynamic script design in two separate includes the setup is always the same for most dynamic systems.
1.) Create enum and initialize a variable with the maximum number of dynamic objects.
2.) Initialize enum values in OnGame/OnFilterScriptInit
3.) Add new dynamic entries by searching through this variable until a empty slot is found.
4.) Creating objects, 3dtext etc and setting enum values of found dynamic slot
5.) Add deletion function