Jump to content

joriss11

Members
  • Posts

    25
  • Joined

  • Last visited

Everything posted by joriss11

  1. Got it working already haha, thanks anyways!
  2. Anyone still has a working link to this script including meta and :~? cause the current link is broken
  3. Thanks it worked now, the only issue I am having now, is that its only a one-use script. as It has to be restarted, once a car was destroyed. after that it wont work haha Edit: nvm, works now. Thanks anyways
  4. @URBAN This worked, however this TP's the player outside of the vehicle, instead of letting him get out using the regular animation. Which is what I was trying to achieve. Is that possible to do so?
  5. Ahh, I tried client side, that might be the issue
  6. Tried your code @URBAN, however this doesn't work either. Using your code the script wont even load, which is a problem haha.
  7. Hey, i am having an issue regarding a certain script. I am trying to create a script, in which the player will automaticly exit the vehicle once it catches fire / has a certain amount of health left. this is what I currently have : [lua] setTimer( function (player) local yass = getPedOccupiedVehicle(player) for _, vehicle in ipairs ( getElementsByType ( "vehicle" ) ) do if getElementHealth(vehicle) < 301 then setVehicleDamageProof( vehicle, true) setVehicleEngineState( vehicle, false) setTimer(removeThePed, 100, 1) else if getElementHealth(vehicle) > 302 then setVehicleDamageProof( vehicle, false) setVehicleEngineState( vehicle, true) end end end end, 100, 0 ) function removeThePed ( ) removePedFromVehicle ( yass ) -- Removes the ped from any vehicle. end [/lua] From what I know I tried my best to get things working correctly. The damage proof and engine state works fine, but the player wont exit the vehicle. if anyone could assist me, that would be great, joriss11
  8. Can you sent me this map?
  9. lets hope that it will turn out fully working, and become a open source Arms Shop scripts. Would use it 100%!
  10. joriss11

    RPG Gamemode

    There is something wrong with the scripts then, wich causes this error. without any code, we cant actually help u.
  11. Contact me on skype: joriss11 , from the Netherlands
  12. FPSLimit = 37 FPSMax = 1 function onClientResourceStart ( resource ) if getElementData(thePlayer, "Class") == "Classname" then if ( guiFPSLabel == nil ) then FPSLimit = 255 / FPSLimit guiFPSLabel = guiCreateLabel ( 0.03, 0.97, 0.1, 0.1, "FPS: 0", true ) FPSCalc = 0 FPSTime = getTickCount() + 1000 addEventHandler ( "onClientRender", getRootElement (), onClientRender ) end end addEventHandler ( "onClientResourceStart", getRootElement (), onClientResourceStart ) function onClientRender ( ) if ( getTickCount() < FPSTime ) then FPSCalc = FPSCalc + 1 else if ( FPSCalc > FPSMax ) then FPSLimit = 255 / FPSCalc FPSMax = FPSCalc end guiSetText ( guiFPSLabel, "FPS: "..FPSCalc.." Max: "..FPSMax ) guiLabelSetColor ( guiFPSLabel, 255 - math.ceil ( FPSCalc * FPSLimit ), math.ceil ( FPSCalc * FPSLimit ), 0 ) FPSCalc = 0 FPSTime = getTickCount() + 1000 end end You can change thePlayer in the Player thing your using, and Change Class into class if not working.
  13. joriss11

    [Help] SQL

    SQL isn't that easy tho. Try to figure it out yourself first, use the wiki. I know something about SQL, but its hard to explain.
  14. Okey, but if someone new joins Chief class. i will need to add him there or can i Use something with getPlayerFromName(ThePlayer) ?
  15. Like this then? server.lua : setElementData(getPlayerFromName("Joris" or "joriss11"), "Chief", true, false) -- Uncomment this in order to make yourself a chief local vehicle = createVehicle(506, 2100.2697, 1397.4947, 10.3, 0, 0, 0) -- Create the vehicle setElementData(vehicle, "Chief", true, false) -- Give it element data in 'Chief' and make its value a boolean 'true' addEventHandler("onVehicleStartEnter", root, function(thePlayer, seat, jacked, door) local vehicleOwner = getElementData(source, "Chief") -- Get the vehicle's element data on 'Chief' local gangGroup = getElementData(thePlayer, "Chief") -- Get the entering player's element data on 'Chief' if (not vehicleOwner) then return end -- If the vehicle doesn't have such data, then cancel if (gangGroup ~= vehicleOwner) then -- If the entering player's data doesn't match the vehicle data, continue outputChatBox("This car is locked and belongs to the following Class: Chief", thePlayer, 245, 20, 20, false) -- Display a warning cancelEvent() -- Prevent the player from entering the vehicle end end ) its still locked and its still not working when im spawned as Chief
  16. The spawner is Server-Side , bu how will i uncomment that? ( Srry for being such a noob in Scripting )
  17. But you did that in the Script already right? becuase you setted the Car + the Class Element's date, but when i spawn as the Class it still won't work. and Ye, im just a noob in such a things and I hope that i will Learn it by this way.
  18. I actually used this code as server.lua . I changed my Coördinates to the location i anted, and the Vehicle is placed there now. I didn't change anything except the Coördinates like i said and it almost works. its lcoked to Chief but when i spawn as the Class : Chief then it is still locked to Chief and i can't enter
  19. if i try this : createVehicle = (506, 2100.2697, 1397.4947, 10.3, 0, 0, 0) addEventHandler("onVehicleStartEnter", root) function ( thePlayer ) local vehicleOwner = getElementData ( class, "Chief" ) local gangGroup = getElementData ( thePlayer, "Chief" ) if not ( vehicleOwner == gangGroup ) then outputChatBox ("This car is Locked and belongs to the Following Class : Chief", thePlayer) cancelEvent() end end then it won't work.
  20. something like this? : Vehicle = (506, 2100.2697, 1397.4947, 10.3, 0, 0, 0) addEventHandler("onVehicleStartEnter", root, function ( thePlayer ) local vehicleOwner = getElementData ( class, "Chief" ); local gangGroup = getElementData ( thePlayer, "Chief" ); if not ( vehicleOwner == gangGroup ) then outputChatBox ("This car is Locked and belongs to the Following Class : Chief", thePlayer); cancelEvent(); end end
  21. okey, thx Citizen. I know im not an scripter and i wanted to use this for an Server. I still don't really get it. Could you maybe help me with 1 car? or help me on the way so i can try/learn it myself?
  22. Hey Guys, im not an scripter and i wanted to know if you guys maybe could explain/give me a good script to lock cars to classes. because me and a Friend making an Server and it would be nice to have some cars that we can lock to gangs. ( no teams ) I hope you guys could help me. PS. it would be nice if we could add the vehicles simply with a command or GUI but we don't mind to use the Ingame editor to place some. Thx, anyways guys
×
×
  • Create New...