Jump to content

XetaQuake

Members
  • Posts

    561
  • Joined

  • Last visited

Everything posted by XetaQuake

  1. okok, i have think this already but what the hell, than why dont work this? -- Somewhere at the top ramp = { } rampspawned = { } --- Put this somewhere in onPlayerJoin event or something, of sterf.. function keyboard ( source ) bindKey ( source, "c", "down", createRamp ) end -- Somewhere in your script function createRamp ( source, command ) if(isPlayerInVehicle ( source ) ) then if( rampspawned [ source ] ~= true ) then local x, y, z = getElementPosition ( source ) local theVehicle = getPlayerOccupiedVehicle ( source ) local a,b,r = getVehicleRotation ( theVehicle ) x = x - math.sin ( math.rad(r) ) * 20 y = y + math.cos ( math.rad(r) ) * 20 ramp [ source ] = createObject ( 1655, x, y, z, 0, 0, r ) rampspawned [ source ] = true setTimer ( RemoveRamp, 2000, 1, source ) end end end function RemoveRamp ( source ) destroyramp = destroyElement( ramp [ source ] ) if ( destroyramp ) then rampspawned [ source ] = false end end addEventHandler ( "onPlayerJoin", getRootElement(), keyboard) (debugscript says nothing)
  2. nice hankey in some seconds i have it uploaded on the server
  3. thank you thank you thank you thank you!! this works sooo good and thanks for the links!! By the way: i think you have write a mistake on this script (or who write this) here the "fix": addEventHandler("onResourceStart", getRootElement(getThisResource)[b][color=#FF0000])[/color][/b], resourceStarted) change to addEventHandler("onResourceStart", getRootElement(getThisResource), resourceStarted) thanks for help! it works and i am so happy!
  4. can nobody look what is wrong? pleas, in other lua scripts i cant it find or dont use
  5. i have already looking in some lua scripts, but the problem is that the most gamemodes have teams or i dont can find the spawnpoint code stuff
  6. thanks for help but noting change btw: ah yes spawnPlayer
  7. i dont was @ home, and i have post it that other members can already post stuff so no i have tried it, and - it dont work debugscript 3: 11: attempt to call global 'spawnPlayer' (a nil value) than i have seen that this is a server side script, so i have write it as server-side in the meta.xml and now it dont work again and the debugscript says noting. but i think this is because i have no addEventHandler, right? so i have write a addEventHandler: addEventHandler( "onClientResourceStart", getRootElement(), key ) and this dont work again, someone a idea?
  8. it that correct? local spawn = getElementsByType ( "spawnpoint" ) -- loop through them for key, value in pairs(spawn) do -- get our info local posX = getElementData ( value, "posX" ) local posY = getElementData ( value, "posY" ) local posZ = getElementData ( value, "posZ" ) -- create an object according to the flag position playerSpawn ( posX, posY, posZ ) end i dont have time to test it, so i have make it in my brain
  9. hi, i am currenty making a vvveerryy litle gamemode, only to learn but the spawnpoint dont work, here is all my stuff: meta.xml <meta> <info author="XetaQuake" description="to learn" version="1.0" type="gamemode" /> <map src="spawnpoints.map"/> </meta> and my spawnpoints.map <map mod="deathmatch" version="1.0"> --Spawn weapons <weapon model="7" ammo="1"/> <weapon model="22" ammo="500"/> <weapon model="26" ammo="16"/> <weapon model="29" ammo="60"/> <weapon model="18" ammo="3"/> --Spawn skins <skin model="105"/> <skin model="106"/> <skin model="107"/> --spawnpoints <spawnpoint id="spawnpoint1" posX="2035.1265869141" posY="1524.2818603516" posZ="10.8203125" rot="0" /> <spawnpoint id="spawnpoint2" posX="2106.6000976563" posY="1403.9052734375" posZ="11.1328125" rot="0" /> <spawnpoint id="spawnpoint3" posX="2234.18359375" posY="1291.4482421875" posZ="10.8203125" rot="0" /> <spawnpoint id="spawnpoint4" posX="1975.0267333984" posY="1620.3448486328" posZ="12.88099861145" rot="0" /> --vehicles <vehicle model="419" posX="2509.6936035156" posY="-1668.8011474609" posZ="13.232522964478" rotX="358.50704956055" rotY="3.806396484375" rotZ="180.99597167969" /> <vehicle model="422" posX="2467.1323242188" posY="-1654.2012939453" posZ="13.385867118835" rotX="358.72198486328" rotY="354.78051757813" rotZ="94.365417480469" /> --pickups <pickup type="health" amount="100" posX="2302.6721191406" posY="-1449.0643310547" posZ="23.99250793457" /> <pickup type="health" amount="100" posX="1704.2354736328" posY="-1135.3688964844" posZ="24.085935592651" /> <pickup type="health" amount="100" posX="1911.2296142578" posY="-1776.4091796875" posZ="13.3828125" /> <pickup type="health" amount="100" posX="1408.5766601563" posY="-1419.2780761719" posZ="14.203125" /> </map> the spawnpoints dont work, i dont spawn! ONLY the vehicles works! but, and this is my second problem: all vehicles are black?! can someone help me on this two problems?
  10. thanks, now it works! and thanks for the info, because i am currently learning LUA BTW: have anybody a idea why the teleport map dont work on Capture the orb?
  11. function keybind ( source ) bindKey ( source, "r", "down", clientToggleGui ) end addEventHandler( "onClientResourceStart", keybind ) dont work again onClientResourceStart have i allready tried befor i request help
  12. I liked the idea, so I quickly coded a script that does exaclty that It's a client-only script that is invoked by the command "radarteleport". It displays the map inside a window and teleports you (or the car you're in) to the clicked position on the ground. A check allows to toggle if you want to go on the water or below. Works best if you bind a key to the command, like "bind n radarteleport". The script is missing any sort of protection, all players can use it. This is my first MTA script so don't be too hard Download Radar Teleport v1.0 (300kb, sorry for the additional copy of the map) can someone say me what is here wrong: function keybind ( source ) bindKey ( source, "r", "down", clientToggleGui ) end addEventHandler( "keybind", clientToggleGui ) i want to show the "Radar Teleport" when i pressing "r"
  13. thanks, i have copy a meta.xml from another resource and have just change the name of the scripts, but i have forgot to set the client/server stuff correct but yes its realy bugy i think
  14. i get this error: ERROR: ...r/mods/deathmatch/resources/glueonvehicle/glue_c.lua:8: attempt to call global 'getLocalPlayer' (a nil value)
  15. nice mister eXo|Mr.Hankey and [MT]Tobi can someone modifi this script, so that users can "deposit" and "withdraw" her bank account on a bank location? best with GUI It would be great when someone make a public bank resource
  16. yes german to pleas ( ä ü ö) but i have read that LUA can not this charakters ;(
  17. i thank you so much =) it works fine thread finish, now i remove it from my favorites
  18. well i think the same, but the script strongly implemented in the server hm, and how can i use this to compile stuff?
  19. yes but when its compiled, he can think "ah, its compiled, its better i dont use it because its not for the public"
  20. because ,no matter why, its just a simple question
  21. i think not all peaple know to decompile, also when its compiled, the peaple who will use it can see that is not for the public can anybody tell me the best freeware LUA compile tool that works with MTA?
  22. hi, how can i protect client side script? so that peaple dont can use it from the chache folder? or it this not possible?
×
×
  • Create New...