xRGamingx Posted December 11, 2016 Share Posted December 11, 2016 Hello friends, How can I put this message as it is in this image? function onEscapeBankZone(ele, matchingDimension) if (ele and ele.type == "player") then if (ele:getData("escapedbr") and ele.team.name == "Criminals") then exports.TGdx:new(ele, "mission passed! $30,000 and 20 crim XP", 0, 255, 0) Link to comment
iPrestege Posted December 11, 2016 Share Posted December 11, 2016 You can draw a text using dxDrawText and use another line like this : x,y = guiGetScreenSize( ) addEventHandler ( 'onClientRender',root, function ( ) dxDrawText ( 'mission passed! \n$30,000 and 20 crim XP',x*400/1366,y*253/768,x*1007/1366,y*414/768,tocolor ( 255,255,0,150 ),1,'pricedown','center','center' ) end ) Link to comment
xRGamingx Posted December 11, 2016 Author Share Posted December 11, 2016 27 minutes ago, iPrestege said: You can draw a text using dxDrawText and use another line like this : x,y = guiGetScreenSize( ) addEventHandler ( 'onClientRender',root, function ( ) dxDrawText ( 'mission passed! $30,000 and 20 crim XP',x*400/1366,y*253/768,x*1007/1366,y*414/768,tocolor ( 255,255,0,150 ),1,'pricedown','center','center' ) end ) I do not know how to place it here. function onEscapeBankZone(ele, matchingDimension) if (ele and ele.type == "player") then if (ele:getData("escapedbr") and ele.team.name == "Criminals") then exports.GTAdx:new(ele, "mission passed! $30,000 and 20 crim XP", 0, 255, 0) ---------mission passed! exports.GTAaccounts:SAD(ele, "crimXP", exports.GTAaccounts:GAD(ele, "crimXP") + 20) ele.money = ele.money + 30000 ele:removeData("escapedbr") exports.GTAstats:setPlayerAccountStat(ele, "successBR", exports.GTAstats:getPlayerAccountStat(ele, "successBR") + 1) end end end addEventHandler("onColShapeLeave", bankZone, onEscapeBankZone) Link to comment
iPrestege Posted December 11, 2016 Share Posted December 11, 2016 you have to make a trigger to client using : triggerClientEvent Link to comment
xRGamingx Posted December 11, 2016 Author Share Posted December 11, 2016 2 minutes ago, iPrestege said: you have to make a trigger to client using : triggerClientEvent But I do not know how to do that well, could you help me, my friend? I would appreciate Link to comment
iPrestege Posted December 11, 2016 Share Posted December 11, 2016 Try this on server side replace this with yours : function onEscapeBankZone(ele, matchingDimension) if (ele and ele.type == "player") then if (ele:getData("escapedbr") and ele.team.name == "Criminals") then triggerClientEvent ( ele,'onDrawReward',ele ) exports.GTAaccounts:SAD(ele, "crimXP", exports.GTAaccounts:GAD(ele, "crimXP") + 20) ele.money = ele.money + 30000 ele:removeData("escapedbr") exports.GTAstats:setPlayerAccountStat(ele, "successBR", exports.GTAstats:getPlayerAccountStat(ele, "successBR") + 1) end end end addEventHandler("onColShapeLeave", bankZone, onEscapeBankZone) And put this on the client side : function aInfoReward ( ) dxDrawText ( 'mission passed! $30,000 and 20 crim XP',x*400/1366,y*253/768,x*1007/1366,y*414/768,tocolor ( 0,255,0,255 ),1,'pricedown','center','center' ) end addEvent ( 'onDrawReward',true ) addEventHandler ( 'onDrawReward',root, function ( ) addEventHandler ( 'onClientRender',root,aInfoReward ) setTimer ( function ( ) removeEventHandler ( 'onClientRender',root,aInfoReward ) end,5000,1 ) end ) 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