Jump to content

maky55

Members
  • Posts

    57
  • Joined

  • Last visited

Everything posted by maky55

  1. Hey guys! So, my friend is helping me learn scripting. And I've also been following the wiki. I have made this script with the help of the wiki and my friend, and he told me to figure it out for myself. So, I wanted to make a script so you can re spawn when you die. I did it and it was quite easy, but you re spawned straight away. I asked my friend if I could use a timer or something so you have to wait for 5 seconds until you re spawn. Here is what I came up with so far: local spawnX, spawnY, spawnZ = 133.78814697266, -35.417057037354, 1.578125 function joinHandler() spawnPlayer(source, spawnX, spawnY, spawnZ) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("Welcome to the test server!", source) end addEventHandler("onPlayerJoin", getRootElement(), joinHandler) function deathTimer() setTimer(deathHandler,5000,1) end local spawnX, spawnY, spawnZ = 133.78814697266, -35.417057037354, 1.578125 function deathHandler() spawnPlayer(source, spawnX, spawnY, spawnZ) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("And... BAM, you're back!", source) end addEventHandler("onPlayerWasted", getRootElement(), deathTimer) The problem is with this, the timer works and it waits for 5 seconds, but in staid of respawning, only the text shows and your camera is left floating in the sky. I made a video for it here: https://www.youtube.com/watch?v=sxzJVwTWHCo&feature=youtu.be Any help with this would me much appreciated! Thanks Tiger.
  2. With the help with Castillo(Solidsnake14) You can have it 3 ways: By skin: By team: By ACL Group: Hope this helps! Thanks to Castillo for the help in changing the script!
  3. I could host the server for you on my computor, i have it on almost 24/7! Just pm me with the details and I will host it for you!
  4. is there anyway to change this bit to the players team?: local data = getElementData(player,"job") if (data=="Admin") (Full script): object = createObject(2933, 2582.1000976563, -2123.6000976563, 1.3999999761581) marker = createMarker(2581.8000488281, -2123, -0.5, "cylinder", 2, 100, 0, 0, 100) function gateo(player) local data = getElementData(player,"job") if (data=="Admin") then moveObject(object, 2000, 2582.1000976563, -2123.6000976563, -5) end addEventHandler("onMarkerHit", gateo) function gatec(player) -- makes a function to close the gate moveObject(object,2933, 2582.1000976563, -2123.6000976563, 1.3999999761581) end addEventHandler("onMarkerLeave", gatec) end
  5. I have made a script to respawn Vehicles and I wanted to output a message to the chatbox that states the players name, is this possible? Here is the script (server side): function respawn() local accountname = getAccountName (getPlayerAccount(source)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then outputChatBox("") setTimer(function () local vehicles = getElementsByType ( "vehicle" ) for k, vehicle in ipairs ( vehicles ) do if checkEmpty( vehicle ) then local seats = getVehicleMaxPassengers(vehicle) resetVehicleIdleTime ( vehicle ) respawnVehicle ( vehicle ) end end end, 10000, 1) end end addEvent( "respawn", true ) addEventHandler( "respawn", getRootElement(), respawn ) function checkEmpty( vehicle ) local passengers = getVehicleMaxPassengers( vehicle ) if type( passengers ) == 'number' then for seat = 0, passengers do if getVehicleOccupant( vehicle, seat ) then return false end end end return true end Thanks
  6. Our forums are up! http://www.urt-rp.com/forum/index.php
  7. I would like to help you! Ill pm you now!
×
×
  • Create New...