D3vZ Posted February 21, 2014 Share Posted February 21, 2014 Bom Dia people! Eu gostava que me podessem dar uma ajuda no seguinte script: Server: function onserver ( ) fadeCamera ( source, false, 2.5, 0, 0, 0 ) takePlayerMoney(source, 70) setTimer ( fadeCamera, 2500, 1, source, true, 2.5) outputChatBox ( "#0066FF========= [#FFFFFFLavagem#0066FF] ===========", source, 255, 255, 255, true ) outputChatBox ( "#0066FF[#FFFFFFLavagem#0066FF]: #FFFFFFCusto da lavagem: #0066FF70€", source, 255, 255, 255, true ) outputChatBox ( "#0066FF[#FFFFFFLavagem#0066FF]: #FFFFFFLavagem realizada!", source, 255, 255, 255, true ) outputChatBox ( "#0066FF=================================", source, 255, 255, 255, true ) end addEvent("onserver",true) addEventHandler("onserver", root, onserver) Client: function cleancar (player, matchingDimension) if getPedOccupiedVehicleSeat (player) == 0 then return end --if getElementType(ve) ~= "vehicle" then return end local vehicle = getPedOccupiedVehicle (player) if ( vehicle ) then engineApplyShaderToWorldTexture( myShader, "vehiclegrunge256",vehicle) engineApplyShaderToWorldTexture( myShader, "?emap*",vehicle) triggerServerEvent ("onserver",vehicle) moveObject(gate, 3000, -187.89, 1222.69, 20.10) moveObject(gate1, 2000, -183.39, 1213.90, 20.10) end end addEventHandler("onClientMarkerHit", Marker, cleancar) O que pretendo é que o jogador que está sentado no lugar zero (0) ou seja o condutor que desconte 70$ dele quando passa no marker; Link to comment
DNL291 Posted February 21, 2014 Share Posted February 21, 2014 Tente isto: function cleancar(player, matchingDimension) if matchingDimension then local vehicle = getPedOccupiedVehicle(player) if (vehicle) then engineApplyShaderToWorldTexture( myShader, "vehiclegrunge256",vehicle) engineApplyShaderToWorldTexture( myShader, "?emap*",vehicle) triggerServerEvent ("onserver", player) moveObject(gate, 3000, -187.89, 1222.69, 20.10) moveObject(gate1, 2000, -183.39, 1213.90, 20.10) end end end addEventHandler("onClientMarkerHit", Marker, cleancar) function onserver ( ) if not (getPlayerMoney(source) >= 70) then return end fadeCamera ( source, false, 2.5, 0, 0, 0 ) takePlayerMoney(source, 70) setTimer ( fadeCamera, 2500, 1, source, true, 2.5) outputChatBox ( "#0066FF========= [#FFFFFFLavagem#0066FF] ===========", source, 255, 255, 255, true ) outputChatBox ( "#0066FF[#FFFFFFLavagem#0066FF]: #FFFFFFCusto da lavagem: #0066FF70€", source, 255, 255, 255, true ) outputChatBox ( "#0066FF[#FFFFFFLavagem#0066FF]: #FFFFFFLavagem realizada!", source, 255, 255, 255, true ) outputChatBox ( "#0066FF=================================", source, 255, 255, 255, true ) end addEvent("onserver",true) addEventHandler("onserver", root, onserver) Link to comment
D3vZ Posted February 25, 2014 Author Share Posted February 25, 2014 Testei mas não funcionou O fadeCamera e o takePlayerMoney não funcionou Erro ( /debugscript 3 ): Link to comment
DNL291 Posted February 26, 2014 Share Posted February 26, 2014 Copie e tente novamente com o meu código. Eu corrigi poucas coisas. Link to comment
D3vZ Posted February 26, 2014 Author Share Posted February 26, 2014 Está perfeito! (: Muito obrigado! 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