sbs7410 Posted January 28, 2014 Posted January 28, 2014 (edited) Hi Guys, My friend did oil (fossil) script. But İt's not working. Can you help we ? function showPlayerFuel() if( fuelFrame) then destroyElement(fuelFrame) destroyElement(fuelBar1) end fuelFrame = guiCreateStaticImage( 0.72, 0.79, 0.05, 0.20, "images/Fuel_Gage.png", true) fuelBar1 = guiCreateStaticImage( 0.742, 0.811, 0.021, 0.17, "images/Fuel_Dot.png", true) guiBringToFront ( fuelFrame ) end addEvent("FullTank", true ) addEventHandler("FullTank", getLocalPlayer(), showPlayerFuel) addEvent("fullRefill", true) addEventHandler("fullRefill",getLocalPlayer(), showPlayerFuel) addEvent("fuelGageShow", true) addEventHandler("fuelGageShow", getLocalPlayer(), showPlayerFuel) function CurrentFuelIn ( currentFuel ) local sizex = currentFuel["sizex"] local sizey = currentFuel["sizey"] local posx = currentFuel["posx"] local posy = currentFuel["posy"] if(fuelFrame) then destroyElement(fuelFrame) destroyElement(fuelBar1) end fuelBar1 = guiCreateStaticImage( tonumber(posx), tonumber(posy), tonumber(sizex), tonumber(sizey), "images/Fuel_Dot.png", true) fuelFrame = guiCreateStaticImage( 0.72, 0.79, 0.05, 0.20, "images/Fuel_Gage.png", true) if(posy and posy > 0.9) then if not warningdot1 then warningdot1 = guiCreateStaticImage( 0.7288, 0.912, 0.014, 0.016, "images/warning_dot.png", true) end if(Posy >= 0.981) then setVehicleEngineState(getPedOccupiedVehicle(gMe),false) else outputChatBox("-- You Are Quite Low On Fuel | Refuel at Area 51", 255, 50, 50, true) playSoundFrontEnd(4) end end end addEvent("CurrentFuel", true) addEventHandler("CurrentFuel", getLocalPlayer(), CurrentFuelIn) function startExit ( thePlayer,seat ) if thePlayer == getLocalPlayer() and seat == 0 then local x, y = guiGetSize( fuelBar1, true ) local Posx, Posy = guiGetPosition ( fuelBar1, true ) local fTbl = {} fTbl.sizex = x fTbl.sizey = y fTbl.posx = Posx fTbl.posy = Posy triggerServerEvent('onGetFuel',source,fTbl) hidePlayerFuel() killTimer(fuelTimer) end end addEventHandler("onClientVehicleStartExit", getRootElement(), startExit ) function vehEntered ( veh,seat ) if seat == 0 and isElement(fuelBar1) then local Posx, Posy = guiGetPosition ( fuelBar1, true ) if(Posy and Posy >= 0.981) then setVehicleEngineState(veh,false) end end fuelTimer = setTimer ( decFuel1, 2000, 0) end addEventHandler("onClientPlayerVehicleEnter", getLocalPlayer(), vehEntered ) function decFuel1() local PlayerInCar = getPedOccupiedVehicle( getLocalPlayer() ) if (PlayerInCar and getVehicleController(PlayerInCar) == gMe and not isPlayerDead(gMe) ) then local x, y = guiGetSize( fuelBar1, true ) local Posx, Posy = guiGetPosition ( fuelBar1, true ) local NewY,NewPosY if not Posy then return end if((isElementWithinColShape(gMe,safeZone) or isElementWithinSafeArea(gMe)) and Posy > 0.812) then NewY = y + 0.009 NewPosY = Posy - 0.009 if(warningdot1) then destroyElement(warningdot1) warningdot1 = nil playSoundFrontEnd(1) end elseif(Posy < 0.981) then local velo = getActualVelocity( PlayerInCar ) local val = (velo < 5 and 0) or (velo < 100 and 0.0006) or 0.0009 NewY = y - val NewPosY = Posy + val if(Posy and (Posy > 0.950 and Posy<0.953) and not warningdot1) then warningdot1 = guiCreateStaticImage( 0.7288, 0.912, 0.014, 0.016, "images/warning_dot.png", true) playSoundFrontEnd(4) end elseif (Posy >= 0.981 and getVehicleEngineState(PlayerInCar)) then setVehicleEngineState(PlayerInCar,false) callServerFunction('setVehicleEngineState',PlayerInCar,false) end guiSetSize(fuelBar1, x, NewY, true) guiSetPosition(fuelBar1, Posx, NewPosY, true ) else hidePlayerFuel() killTimer(fuelTimer) end end function hidePlayerFuel () if fuelBar1 then destroyElement(fuelBar1) destroyElement(fuelFrame) if warningdot1 then destroyElement(warningdot1) end fuelBar1,fuelFrame,warningdot1 = nil end end addEvent("jacked", true ) addEventHandler("jacked", getLocalPlayer(), hidePlayerFuel ) function getActualVelocity( element ) if(element) then x,y,z = getElementVelocity(element) end return math.sqrt(x^2 + y^2 + z^2) * 161 end Edited January 29, 2014 by Guest
Castillo Posted January 28, 2014 Posted January 28, 2014 Why is not working? what's the problem? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
sbs7410 Posted January 28, 2014 Author Posted January 28, 2014 Error= Client triggered serverside event onGetFuel, but event is not added serverside
Castillo Posted January 28, 2014 Posted January 28, 2014 Post the server side script. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted January 28, 2014 Posted January 28, 2014 No, post the server side script. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted January 29, 2014 Posted January 29, 2014 Who created that script? because you obviously didn't. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
sbs7410 Posted January 29, 2014 Author Posted January 29, 2014 My friend, Ahmet Kılıç. But he went to holiday, a week ago.
sbs7410 Posted January 29, 2014 Author Posted January 29, 2014 Pff. Plase help me. Because I need this script urgently
Castillo Posted January 29, 2014 Posted January 29, 2014 Even if that's true, he forgot to give you the server side script. So, after your "friend" gets back from holidays, ask him for the server side script. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
sbs7410 Posted January 29, 2014 Author Posted January 29, 2014 Are you calling me a liar? Please delete this thread. I do not want to be called a liar. >
Castillo Posted January 29, 2014 Posted January 29, 2014 Well, you posted a client side script which uses a server side script that you don't have claiming it's yours. To my eyes, that's a stolen script. Topic locked. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Recommended Posts