Jump to content

BieHDC

Members
  • Posts

    296
  • Joined

  • Last visited

Everything posted by BieHDC

  1. if you wanna make somebody admin then use Admin Panel because if somebody find out the command then...you know btw: i think you wanna embebbd the code in your scripts and if a server uploads it you can make yourself admin there
  2. havent had time to try out sry :c will do tomorror
  3. Like so? carsall = getElementsByType("vehicle", root) for vehicleKey, vehicleValue in ipairs ( carsall ) do if getElementModel == 598 then blowVehicle ( vehicleValue ) end edit: so nothing happens :c
  4. i want that only ID 598 explodes and no other one and to blow every vehicle you can use root = getRootElement () blowVehicle ( root )
  5. Why get with this code ALL vehicle blown and not only the ID 598 ? police = getVehiclesOfType ( 598 ) for vehicleKey, vehicleValue in ipairs ( police ) do blowVehicle ( vehicleValue ) end
  6. ahh ok and it works like i wanted it thx to you my script is now version 0.3.2 instead of 0.3
  7. ok thx i will try this edit: but i wanna get the vehicle, posx ... from spawnpoint id but what you wrote is only to get all spawnpoints and all data from them
  8. ok thx i will try is this also for race gamemode?
  9. Hello, i tryed to find anything, with which i can check the players race state, but i dont found anything. Maybe one of you know it (for sure), but i am too noob to find It is very important to fix a bug in my script, which i provide when its ready for gerneral usuage. Thx for any help^
  10. And with this i can get the Data out of a map file?
  11. Hello, i wanted to know how to get the spawnpoint id from a map file the id is given from a string... ...but how to get this string Because if the string is in this example "THEID" i wanna do some sets for this. i have already found !getElementsByType("spawnpoint")! , but i think this wont be neccersary edit: or tell me how to use the full string like... vehicle, x, y, z, rx, ry, rz = ineedsomeinfo ( THEID ) Please help me, thankes
  12. sry man, but the freeroam also only sets colours on client side but i will try and try until its working ps: i am learing lua now but i have problems
  13. i found out something interesting... i have had a look at freeroam resource and there is colour also ONLY clientside, BUT the colour is updated with on client render if i simple add an update color handler with on client render maybe it works? edit: function updateColor() if (not colorPicker.isSelectOpen) then return end local r, g, b = colorPicker.updateTempColors() if (editingVehicle and isElement(editingVehicle)) then local r1, g1, b1, r2, g2, b2 = getVehicleColor(editingVehicle, true) if (guiCheckBoxGetSelected(checkColor1)) then r1, g1, b1 = r, g, b end if (guiCheckBoxGetSelected(checkColor2)) then r2, g2, b2 = r, g, b end if (guiCheckBoxGetSelected(checkColor3)) then setVehicleHeadLightColor(editingVehicle, r, g, b) end setVehicleColor(editingVehicle, r1, g1, b1, r2, g2, b2) end end addEventHandler("onClientRender", root, updateColor)
  14. i already got this working sucsessfully on clientside but there were the colours not synced :c and what if isElement not player? edit: starting at the first part to get colour player isnt element...so not working :C i managed 6 errors with player as element but these i dont get to work do i need a combination of client and server? and if yes how to get the player serverside or how to get colour synced?
  15. ok so no vehicle table, so we stay at my idea But pls only tell me how to fix this 3 wrong lines please i try since 3 days now and cant get it work :c
  16. I have read all tut again, but i still cant get these 3 errors out -.- i give it up, pls can someone fix? Edit: Do you think i shouldnt make it over players? can i do all vehicles in the map in a table and set if for thevehicle without players included? [12:54:03] WARNING: [new]/vehcol/vehcolch.lua:25: Bad argument @ 'getPedOccupied Vehicle' [12:54:04] WARNING: [new]/vehcol/vehcolch.lua:40: Bad argument @ 'getPedOccupied Vehicle' [12:54:04] WARNING: [new]/vehcol/vehcolch.lua:41: Bad argument @ 'getElementHeal th' [Expected element at argument 1, got boolean] function checkifcarburn ( thePlayer ) --this works, but only built in to check damage local car2 = getPedOccupiedVehicle ( thePlayer ) local vhealth = getElementHealth ( car2 ) outputChatBox ( "Vehicle Health is " ..vhealth.. "." , thePlayer ) setTimer ( checkifcarburn, 2000, 1, thePlayer) end addCommandHandler ( "fic", checkifcarburn ) --car = getPedOccupiedVehicle( player ) --some parameters i used client side (ignore them) --vhealth = getElementHealth( car ) --d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12 = getVehicleColor ( car, true ) isitflickering = "false" function plssavemycolor ( source ) isitflickering = "false" setTimer ( plssavemycolor2, 15000, 1, thePlayer ) outputChatBox ( "try to get color", thePlayer ) end addEventHandler ( "onPlayerSpawn", getRootElement(), plssavemycolor ) function plssavemycolor2 ( thePlayer ) isitflickering = "false" local car = getPedOccupiedVehicle ( player ) if ( car ) then d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12 = getVehicleColor ( car, true ) outputChatBox ( "got colour?", thePlayer ) else outputChatBox ( "no colour?", thePlayer ) end end function plsresetmycolor ( thePlayer ) local car = getPedOccupiedVehicle( thePlayer ) setVehicleColor ( car, d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12 ) isitflickering = "false" end function burningcar ( source ) local car = getPedOccupiedVehicle( thePlayer ) local vhealth = getElementHealth ( car ) if ( car ) then if vhealth <= 300 then if isitflickering == "false" then setTimer ( flickit, 50, 1 ) isitflickering = "true" elseif vhealth >= 1000 then isitflickering = "false" setTimer ( plsresetmycolor, 100, 1, thePlayer ) end end end end addEventHandler("onVehicleDamage", root, burningcar ) function flickit ( thePlayer ) local car = getVehicleOccupant ( thePlayer ) local c = 1 setVehicleColor ( car, c, c, c, c ) setTimer ( burcrd, 100, 1, thePlayer ) end function burcrd ( thePlayer ) local car = getPedOccupiedVehicle( thePlayer ) local vhealth = getElementHealth( car ) if ( car ) then if vhealth <= 300 then local cc = 3 setVehicleColor ( car, cc, cc, cc, cc ) setTimer ( flickit, 100, 1, thePlayer ) elseif vhealth >= 1000 then isitflickering = "false" setTimer ( plsresetmycolor, 100, 1, thePlayer ) end end end
  17. i already used it but then i removed it because someone wrote it doesnt work serverside
  18. so only use the "local" thing? that i have hed in client version but i took out -.-
  19. i already read all of this but i need an example which comes near to my script
  20. ok can you pls give me a link where i can see an example? and if i use local before?
  21. Pls decribe a bit exactlier, i dont know why you mean
  22. Hmmm i stuck now very hard :c i managed some parts to work but the others i cant made. Pls help and thx for help [12:03:35] WARNING: [new]/vehcol/vehcolch.lua:12: Bad argument @ 'getVehicleOccu pant' [12:03:39] WARNING: [new]/vehcol/vehcolch.lua:24: Bad argument @ 'getPedOccupied Vehicle' [12:03:39] WARNING: [new]/vehcol/vehcolch.lua:25: Bad argument @ 'getElementHeal th' [Expected element at argument 1, got boolean] --serverside isitflickering = "false" function plssavemycolor ( thePlayer ) isitflickering = "false" setTimer (plssavemycolor2, 15000, 1, thePlayer) end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), plssavemycolor ) function plssavemycolor2 ( root ) isitflickering = "false" car = getVehicleOccupant ( thePlayer ) if ( car ) then d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12 = getVehicleColor (car, true ) end end function plsresetmycolor ( thePlayer ) setVehicleColor ( car, d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12 ) isitflickering = "false" end function burningcar ( root ) car = getPedOccupiedVehicle( thePlayer ) vhealth = getElementHealth ( car ) if ( car ) then if vhealth <= 300 then if isitflickering == "false" then setTimer ( flickit, 50, 1 ) isitflickering = "true" elseif vhealth >= 1000 then isitflickering = "false" setTimer ( plsresetmycolor, 100, 1, player ) end end end end addEventHandler("onVehicleDamage", root, burningcar ) function flickit ( player ) car = getVehicleOccupant ( player ) c = 1 setVehicleColor ( car, c, c, c, c ) setTimer ( burcrd, 100, 1, thePlayer ) end function burcrd ( thePlayer ) car = getPedOccupiedVehicle( player ) vhealth = getElementHealth( car ) if ( car ) then if vhealth <= 300 then local cc = 3 setVehicleColor ( car, cc, cc, cc, cc ) setTimer ( flickit, 100, 1, thePlayer ) elseif vhealth >= 1000 then isitflickering = "false" setTimer ( plsresetmycolor, 100, 1, player ) end end end
  23. Cool, wir könnten die wirtschaft auch ins wanken bringen und sehen was passiert
×
×
  • Create New...