JoZeFSvK Posted February 21, 2013 Share Posted February 21, 2013 Hey i create info and i have problem i dont see message and i dont know what i have use addEventHandler("onMapStart", function dmgm() dxDrawColorText("#ffffffHELLO WORLD Ghostmode is #00ff00ENABLED#FFFFFF!",750,y/20,574.0,20.0,tocolor(200,0,0,255),1,"default-bold","left","top",false,false,false) dxDrawImage (730,y/20,16,16,"icon/icon.png",0,-120) end addEvent("onMapStarting",true) addEventHandler("onMapStarting", dmgm) addEvent("onMapStart",true) Link to comment
manve1 Posted February 21, 2013 Share Posted February 21, 2013 function dmgm() dxDrawColorText("#ffffffHELLO WORLD Ghostmode is #00ff00ENABLED#FFFFFF!",750,y/20,574.0,20.0,tocolor(200,0,0,255),1,"default-bold","left","top",false,false,false) dxDrawImage (730,y/20,16,16,"icon/icon.png",0,-120) end addEvent("onMapStarting",true) addEventHandler("onMapStarting", root, dmgm) addEvent("onMapStart",true) addEventHandler("onMapStart", root, dmgm) to make it dx stuff like images, texts visible u MUST use 'onClientRender' or any other function that would do the trick of repeating the creation of the dx file Link to comment
Sora Posted February 21, 2013 Share Posted February 21, 2013 onMapStarting is a server event , you can't use it with a client function you have to use onClientMapStarting it would be like this function dmgm() dxDrawColorText("#ffffffHELLO WORLD Ghostmode is #00ff00ENABLED#FFFFFF!",750,y/20,574.0,20.0,tocolor(200,0,0,255),1,"default-bold","left","top",false,false,false,true) dxDrawImage (730,y/20,16,16,"icon/icon.png",0,-120) setTimer(function () removeEventHandler("onClientRender",root,dmgm) end,5000,1) end addEventHandler("onClientMapStarting",root,function () addEventHandler("onClientRender",root,dmgm) end) Edit : ah i almost forgot to tell you the dxDrawColorText is not a predefined function , you have to add it into your script : https://wiki.multitheftauto.com/wiki/DxDrawColorText but you also can enable the colorcoded feature which works only from mta 1.3.1 onwards dxDrawText("#ffffffHELLO WORLD Ghostmode is #00ff00ENABLED#FFFFFF!",750,y/20,574.0,20.0,tocolor(200,0,0,255),1,"default-bold","left","top",false,false,false,true) 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