brad Posted September 13, 2011 Share 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 Link to comment
JR10 Posted September 13, 2011 Share Posted September 13, 2011 Do you mean importing a custom font? dxCreateFont guiCreateFont ?? Link to comment
brad Posted September 13, 2011 Author Share Posted September 13, 2011 yeah ,but for un drawText default of race Link to comment
Castillo Posted September 13, 2011 Share 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. Link to comment
brad Posted September 13, 2011 Author Share 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 Link to comment
Castillo Posted September 13, 2011 Share Posted September 13, 2011 There's an example in here: https://wiki.multitheftauto.com/wiki/DxCreateFont Just read it, it's already well explained. Link to comment
bandi94 Posted September 13, 2011 Share Posted September 13, 2011 local currentMap = exports.mapmanager:getRunningGamemodeMap() local mapname = getResourceInfo(currentMap, "name") or getResourceName(currentMap) Link to comment
brad Posted September 13, 2011 Author Share Posted September 13, 2011 thx bandi94 and catillo thx much : D Link to comment
Castillo Posted September 13, 2011 Share Posted September 13, 2011 You welcome. P.S: Bandi, getResourceInfo is server only. Link to comment
bandi94 Posted September 13, 2011 Share Posted September 13, 2011 i know he will trigger it from server to client's Link to comment
brad Posted September 13, 2011 Author Share Posted September 13, 2011 but where I place that sends me the black screen? Link to comment
bandi94 Posted September 13, 2011 Share Posted September 13, 2011 I do not understand Link to comment
brad Posted September 13, 2011 Author Share Posted September 13, 2011 where in the race_client put those 2 lines? Link to comment
bandi94 Posted September 13, 2011 Share 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) Link to comment
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