Jump to content

Peti930

Members
  • Posts

    18
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Peti930's Achievements

Square

Square (6/54)

0

Reputation

  1. can you get involved with this? function spoilernyit() if getElementModel(theVeh) == 502 then local sX, sY, sZ = getVehicleComponentPosition(theVeh, "movspoiler_24.0_5200") if spd >= 100 then if sZ < 0.6 then setVehicleComponentPosition(theVeh, "movspoiler_24.0_5200", sX, sY-0.004, sZ+0.005) end elseif spd < 100 then if sZ > 0.45 then setVehicleComponentPosition(theVeh, "movspoiler_24.0_5200", sX, sY+0.008, sZ-0.01) end end elseif getElementModel(theVeh) == 506 then local sX, sY, sZ = getVehicleComponentPosition(theVeh, "movspoiler_23.5_1800") if spd >= 100 then if sZ < 1.2 then setVehicleComponentPosition(theVeh, "movspoiler_23.5_1800", sX, sY-0.006, sZ+0.005) end elseif spd < 100 then if sZ > 1 then setVehicleComponentPosition(theVeh, "movspoiler_23.5_1800", sX, sY+0.012, sZ-0.01) end end end end end end addEventHandler("onClientRender", root, spoilernyit)
  2. client or server sided?xd i been lost the line
  3. again, end expected near <eof>
  4. 'end' expected near <eof> :C
  5. [igazítottam/ im corrigated ] Now it says: WARNING: spoileruj/sp.lua:1: Bad argument @ 'bindKey' [Expected string at argument 1, got nil]
  6. Hi i have this script, and debugscript 3 says: error: <eof> expected near 'end". Can anyone help me? function spoilernyit() if getElementModel(theVeh) == 502 then local sX, sY, sZ = getVehicleComponentPosition(theVeh, "movspoiler_24.0_5200") if sZ < 0.6 then setVehicleComponentPosition(theVeh, "movspoiler_24.0_5200", sX, sY-0.004, sZ+0.005) end elseif sZ > 0.45 then setVehicleComponentPosition(theVeh, "movspoiler_24.0_5200", sX, sY+0.008, sZ-0.01) end end end end end end bindKey ( thePlayer, "Num_5", "down" , spoilernyit)
  7. Peti930

    Spoiler

    És ha a kocsi modelljében tudom a component nevét megtudod nekem oldani?
  8. Peti930

    Spoiler

    Anyone can make me a script like that? i have no idea how to start i
  9. Peti930

    Trunk open

    Can u make it i can use it in vehicle Bullet? (Veh id: 541)
  10. Peti930

    Trunk open

    Can u give me instructions?
  11. Peti930

    Trunk open

    Hi i want to make a script to if i type /trunk the trunk is goingto open and i type it again the trunk is closeing OR not /trunk, bind it to End
  12. Hi, i have a script with i type /addvillogo and add a siren to my car, but i want /delvillogo with i can delete the siren wath I created and want /delallvillogo with delete a siren by created anyone. And anyone can make me an sql to this? loader.lua: function ChangeObjectModel (filename,id) if id and filename then if fileExists(filename..".txd") then txd = engineLoadTXD( filename..".txd" ) engineImportTXD( txd, id ) end if fileExists(filename..".dff") then dff = engineLoadDFF( filename..".dff", 0 ) engineReplaceModel( dff, id ) end if fileExists(filename..".col") then col = engineLoadCOL( filename..".col" ) engineReplaceCOL( col, id ) end engineSetModelLODDistance(id,300) end end ChangeObjectModel("block",1632) siren.lua: mysql = exports.mysql --Script be: @Peti local chargerPos = { [445] = {0,0,-0.05}, -- BMW M5 Poz. X Y Z } local vehicleChargers = {} function ElementDataChange(dataName,oldValue) if getElementType(source) == "vehicle" and dataName == "tuning.superCharger" then local newValue = getElementData(source,dataName) --outputChatBox(newValue) if tonumber(newValue) == 0 then --outputChatBox("#7cc576[PetiScripts]: #ffffffSikeresen törölted a SuperCharger kiegészítőt!", p, 255, 0, 0, true) destroyElement(vehicleChargers[getElementData(source,"dbid")]) if (isElement(vehicleChargers[getElementData(source,"dbid")])) then destroyElement(vehicleChargers[getElementData(source,"dbid")]) end else createChargerToVeh(getElementData(source,"dbid"),source) end end end addEventHandler("onElementDataChange",getRootElement(),ElementDataChange) function loadChargers(vehicle) for k, v in ipairs(getElementsByType("vehicle")) do if tonumber(getElementData(v, "tuning.superCharger")) == 1 then createChargerToVeh(getElementData(v, "dbid"), v) end end end addEventHandler("onResourceStart", getRootElement(), loadChargers) function createChargerToVeh(vehID,element) if isElement(vehicleChargers[vehID]) then return end vehicleChargers[vehID] = createObject(1632,0,0,0) attachElements(vehicleChargers[vehID],element,chargerPos[getElementModel(element)][1],chargerPos[getElementModel(element)][2],chargerPos[getElementModel(element)][3]) end function destroyCharger(vehID) local veh = getPedOccupiedVehicle(p) if (isElement(vehicleChargers[vehID])) then destroyElement(vehicleChargers[vehID]) end end addCommandHandler("addvillogo",function(p,c,state) if state then outputChatBox("[SanMTA - Peti] Sikeresen felszerelted az egyedi villogót!", p) if isPedInVehicle(p) then outputChatBox("", p) local veh = getPedOccupiedVehicle(p) local vehid = getElementData(veh, "dbid") setElementData(getPedOccupiedVehicle(p),"tuning.superCharger",state) --mysql:query_free("UPDATE vehicles SET supercharger = '" .. state .. "' WHERE id='" .. getElementData(veh, "dbid") .. "'") end end end)
  13. Seeing in debugscript 3: ERROR: Loading script failed: spikedel/server.lua:2:')' expected near 'do" Im passed it, only you forgot an ")", thanks! Uhm i have a problem, if i use /delspikes its deleting the object but if you go to this area where your car rubber was off its get off again Can you make a scrpit with i use command /delspikes and its restarts the "spike" resource? Because this is a small script and cant be "NETWROK TROUBLE"
×
×
  • Create New...