brad Posted September 13, 2011 Posted September 13, 2011 hi friends want to know how to import a source to a normal text and I saw race gamemode compare and study but is not a function I would like for example the name or map timeelft thanx
JR10 Posted September 13, 2011 Posted September 13, 2011 Do you mean importing a custom font? dxCreateFont guiCreateFont ??
brad Posted September 13, 2011 Author Posted September 13, 2011 yeah ,but for un drawText default of race
Castillo Posted September 13, 2011 Posted September 13, 2011 What do you mean? if you want to create a new font and use it, just create it and change the font to yours in the dxDrawText function.
brad Posted September 13, 2011 Author Posted September 13, 2011 An example would be: I want to change the source of drawText showing the map name in the pro race gamemode want to know how the place you first imported to the name of his source to drawText showing the map name as if he brought the mta 1.1 defautl
Castillo Posted September 13, 2011 Posted September 13, 2011 There's an example in here: https://wiki.multitheftauto.com/wiki/DxCreateFont Just read it, it's already well explained.
bandi94 Posted September 13, 2011 Posted September 13, 2011 local currentMap = exports.mapmanager:getRunningGamemodeMap() local mapname = getResourceInfo(currentMap, "name") or getResourceName(currentMap)
Castillo Posted September 13, 2011 Posted September 13, 2011 You welcome. P.S: Bandi, getResourceInfo is server only.
bandi94 Posted September 13, 2011 Posted September 13, 2011 i know he will trigger it from server to client's
brad Posted September 13, 2011 Author Posted September 13, 2011 but where I place that sends me the black screen?
brad Posted September 13, 2011 Author Posted September 13, 2011 where in the race_client put those 2 lines?
bandi94 Posted September 13, 2011 Posted September 13, 2011 server side function send() local currentMap = exports.mapmanager:getRunningGamemodeMap() local mapname = getResourceInfo(currentMap, "name") or getResourceName(currentMap) triggerClientEvent ( "name", getRootElement(), name ) end addEvent("onMapStart",true) addEventHandler("onMapStart",getRootElement(),send) client side local gui =guiCreateLabel( float x, float y, float width, float height, "", true) --x,y,width and height are numbers between 0-1 function draw(name) guiSetText(gui,name) end addEvent("name",true) addEventHandler("name",getRootElement(),draw)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now