Fabioxps Posted April 19, 2013 Share Posted April 19, 2013 because it does not work function asd() ped = createPed(0, -1048.6999511719,909.59997558594, 1.2000000476837) pVeh = createVehicle ( 411, -1048.6999511719,909.59997558594, 1.2000000476837, 0, 0, 247.99438476563 ) warpPedIntoVehicle ( ped,pVeh ,0 ) addEventHandler("onClientRender",getRootElement(),stunt) end addEvent("showDrawTag",true) addEventHandler("showDrawTag",getRootElement(),asd) function stunt ( ) if pVeh ~= nil then local x,y,z = getElementPosition(pVeh) local px,py,pz = x+5, y+10, z+2 local distance = getDistanceBetweenPoints3D ( x,y,z,px,py,pz ) if distance <= 150 then local sx,sy = getScreenFromWorldPosition ( x, y, z+0.55, 0.06 ) if not sx then return end local scale = 1/(0.3 * (distance / 150)) if winnername2 ~= nil then local scale = 1 / ( 0.3 * ( distance / 150 ) ) dxDrawImage ( sx - 100, sy - 105, 200, 70,"tooltip.png",0,0,0,tocolor(255,255,255,255)) dxDrawText ( "aa", sx, sy - 70, sx, sy - 60, tocolor ( 255, 255, 255, 255 ), math.min ( 0.4 * ( 20 / distance ) * 1.4, 4 ), "default-bold", "center", "bottom", false, false, false, true ) end end end end end end Link to comment
iPrestege Posted April 19, 2013 Share Posted April 19, 2013 Am not sure but are using this code hole code in one file? Link to comment
Castillo Posted April 19, 2013 Share Posted April 19, 2013 Mind explaining what is the problem? Link to comment
Fabioxps Posted April 19, 2013 Author Share Posted April 19, 2013 Mind explaining what is the problem? I do not speak English I'm sorry I take a look here does not work local peds = { } local pedss = { } local pedsss = { } function asd() triggerServerEvent( "onCameraStartz",root, inici) end addEvent( "showNextMapText", true ) addEventHandler("showNextMapText",getRootElement(),asd) function cameraStarts(ped) setPedControlState(ped,"accelerate",true) setTimer(function() setPedControlState(ped,"accelerate",false) end,100,1) pVeh = getPedOccupiedVehicle(ped) if not peds[ped] then peds[ped] = pVeh end addEventHandler("onClientRender",getRootElement(),stunt) end addEvent( "showNextMapTextsss", true ) addEventHandler( "showNextMapTextsss",root, cameraStarts ) function stunt ( ) local x, y = guiGetScreenSize ( ) for _, veh in pairs ( peds ) do if ( veh ) then local x, y, z = getElementPosition ( veh ) local px, py, pz = x + 5, y + 10, z + 2 local distance = getDistanceBetweenPoints3D ( x, y, z, px, py, pz ) if ( distance <= 150 ) then local sx, sy = getScreenFromWorldPosition ( x, y, z + 0.55, 0.06 ) if ( sx ) then if stunt ~= nil then local scale = 1 / ( 0.3 * ( distance / 150 ) ) dxDrawImage ( sx - 100, sy - 105, 200, 70,"tooltip.png",0,0,0,tocolor(255,255,255,255)) dxDrawText ( "aa", sx, sy - 70, sx, sy - 60, tocolor ( 255, 255, 255, 255 ), math.min ( 0.4 * ( 20 / distance ) * 1.4, 4 ), "default-bold", "center", "bottom", false, false, false, true ) end end end end end end function inici() segura = createObject ( 3316, -1061.6999511719, 914.79998779297, 3.2999999523163, 0, 0, 101.99353027344 ) ped = createPed(0, -1048.6999511719,909.59997558594, 1.2000000476837) pVeh = createVehicle ( 411, -1048.6999511719,909.59997558594, 1.2000000476837, 0, 0, 247.99438476563 ) warpPedIntoVehicle ( ped,pVeh ,0 ) setVehicleColor( pVeh, 255, 255, 0 ) triggerClientEvent("showNextMapTextsss",root, ped,pVeh) outputChatBox("test") end addEvent( "onCameraStartz", true ) addEventHandler( "onCameraStartz",root, inici) function inicis() destroyElement(segura) destroyElement(pVeh) destroyElement(cAmssss) end addEvent( "onCameraFiniched", true ) addEventHandler( "onCameraFiniched",root, inicis) Link to comment
xXMADEXx Posted April 19, 2013 Share Posted April 19, 2013 Use the "Other Languages" board... or google translate. 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