Jump to content

stefutz101

Members
  • Posts

    245
  • Joined

  • Last visited

Everything posted by stefutz101

  1. Hi, what ids i must type in those lines to stop players with modified map to enter on server ? Thanks in advance. none-- i think this is good like this --this is good too (i guess) 20-- ?! ---https://wiki.multitheftauto.com/wiki/Anti-cheat_guide I already read the wiki about those ids but i dont understand nothing . Somenone can explain to me ? Please ...
  2. "This is the primary means of passing information between the client and the server." Source : Wiki. Ok i got it.
  3. function matura(source) local marker = createMarker( 0, 0, 0, "cylinder", 3, 255, 0, 0, 170, source) local blip = createBlip(0, 0, 0,0,2,255,0,0,255,0,2000,source) addEventHandler( "onMarkerHit", marker, MarkerHit1) end addCommandHandler("broom",matura) function MarkerHit1( hitElement, matchingDimension ) if isElement(source) and getElementType(source)=="marker" then destroyElement(source) end if isElement(blip) and getElementType(blip)=="blip" then destroyElement(blip) end end How i can destroy a blip on marker hit ? I should tigger a function ? To do that ? EDIT: triggerServerEvent ( "delmarker", blip) ----------------------- function destroyblip(blip) if isElement(blip) and getElementType(blip)=="blip" then destroyElement(blip) end end addEvent ( "delmarker", true ) addCommandHandler("delmarker",destroyblip) Cand i do like this ?
  4. Ok , thanks . My bad , working :D
  5. Ok , thanks . My bad , working :D
  6. Nope , not that is the problem. The command is working but i want to know what i must change to reload the xml file after i create a new veh.
  7. Nope , not that is the problem. The command is working but i want to know what i must change to reload the xml file after i create a new veh.
  8. Isnt working ... addCommandHandler({"createvehicle", "makeveh", "makevehicle", "makecar"}, function(player, cmd, name, color1, color2, tint, owner) if exports.brpExports:isPlayerLeadAdmin(player) then xml = xmlLoadFile("vehicles.xml") if name and color1 and color2 and tint then local find_ = string.find(name, "_") if tonumber(color1) >= 0 and tonumber(color1) <= 126 and tonumber(color2) >= 0 and tonumber(color2) <= 126 then local px, py, pz = getElementPosition(player) local rx, ry, rz = getElementRotation(player) local interior = getElementInterior(player) local dimension = getElementDimension(player) local model1 = getVehicleModelFromName(string.gsub(name,"_"," ")) local model2 = getVehicleModelFromName(tostring(name)) local new = xmlCreateChild(xml, "veh") local id = math.random(1,99999) if find_ then vehh = createVehicle(model1, px + 4, py, pz, rx, ry, rz) outputChatBox("Created a " .. getVehicleNameFromModel(model1) .. " with ID " .. tonumber(id) .. ".", player, 0, 255, 0, false) outputServerLog("[VEHICLE] [CMD/CREATEVEHICLE]: " .. getPlayerName(player) .. " created a " .. getVehicleNameFromModel(model1) .. " with ID " .. tonumber(id) .. ".") xmlNodeSetAttribute(new, "model", tonumber(model1)) else vehh = createVehicle(model2, px + 4, py, pz, rx, ry, rz) outputChatBox("Created a " .. getVehicleNameFromModel(model2) .. " with ID " .. tonumber(id) .. ".", player, 0, 255, 0, false) outputServerLog("[VEHICLE] [CMD/CREATEVEHICLE]: " .. getPlayerName(player) .. " created a " .. getVehicleNameFromModel(model2) .. " with ID " .. tonumber(id) .. ".") xmlNodeSetAttribute(new, "model", tonumber(model2)) end local vpx, vpy, vpz = getElementPosition(vehh) local vrx, vry, vrz = getElementRotation(vehh) xmlNodeSetAttribute(new, "id", tonumber(id)) xmlNodeSetAttribute(new, "posx", tonumber(vpx)) xmlNodeSetAttribute(new, "posy", tonumber(vpy)) xmlNodeSetAttribute(new, "posz", tonumber(vpz)) xmlNodeSetAttribute(new, "rotx", tonumber(vrx)) xmlNodeSetAttribute(new, "roty", tonumber(vry)) xmlNodeSetAttribute(new, "rotz", tonumber(vrz)) xmlNodeSetAttribute(new, "interior", tonumber(interior)) xmlNodeSetAttribute(new, "dimension", tonumber(dimension)) xmlNodeSetAttribute(new, "color1", tonumber(color1)) xmlNodeSetAttribute(new, "color2", tonumber(color2)) xmlNodeSetAttribute(new, "health", 1000) xmlNodeSetAttribute(new, "fuel", 100) xmlNodeSetAttribute(new, "engineState", 0) xmlNodeSetAttribute(new, "lightsState", 0) xmlNodeSetAttribute(new, "handbrakeState", 1) xmlNodeSetAttribute(new, "lockState", 0) xmlNodeSetAttribute(new, "factionid", 0) xmlNodeSetAttribute(new, "createdby", getPlayerName(player)) if owner then local target = exports.brpExports:findPlayer(owner, player) if target then local acc = getPlayerAccount(target) xmlNodeSetAttribute(new, "owner", getAccountName(acc)) setElementData(vehh, "vehicle.owner", getAccountName(acc)) else outputChatBox("Failed to set the owner. Default set.", player, 255, 0, 0, false) end else xmlNodeSetAttribute(new, "owner", 0) setElementData(vehh, "vehicle.owner", 0) end if tonumber(tint) == 0 then xmlNodeSetAttribute(new, "tinted", 0) elseif tonumber(tint) == 1 then xmlNodeSetAttribute(new, "tinted", 1) else xmlNodeSetAttribute(new, "tinted", 0) end xmlSaveFile(xml) xmlUnloadFile(xml) reload = xmlLoadFile("vehicles.xml") xmlSaveFile(reload) xmlUnloadFile(reload) -- Set current in-game datas setElementData(vehh, "vehicle.id", id) setElementData(vehh, "vehicle.engine", 0) setElementData(vehh, "vehicle.lights", 0) setElementData(vehh, "vehicle.lock", 0) setElementData(vehh, "vehicle.fuel", 100) setElementData(vehh, "vehicle.handbrake", 1) setElementData(vehh, "vehicle.faction", 0) setElementData(vehh, "factions.vehicle", 0) setElementData(vehh, "vehicle.tint", tint) setVehicleColor(vehh, tonumber(color1), tonumber(color2), 0, 0) else outputChatBox("Color values must be 0-126.", player, 255, 0, 0, false) end else outputChatBox("Syntax: /" .. cmd .. " []", player, 220, 220, 0, false) outputChatBox("If the vehicle name has spaces, just put on an underscore: _ and it will automaticly detect it.", player, 255, 255, 255, false) outputChatBox("Tints: 0 = false, 1 = true", player, 255, 255, 255, false) end end end ) Heres the function...
  9. Isnt working ... addCommandHandler({"createvehicle", "makeveh", "makevehicle", "makecar"}, function(player, cmd, name, color1, color2, tint, owner) if exports.brpExports:isPlayerLeadAdmin(player) then xml = xmlLoadFile("vehicles.xml") if name and color1 and color2 and tint then local find_ = string.find(name, "_") if tonumber(color1) >= 0 and tonumber(color1) <= 126 and tonumber(color2) >= 0 and tonumber(color2) <= 126 then local px, py, pz = getElementPosition(player) local rx, ry, rz = getElementRotation(player) local interior = getElementInterior(player) local dimension = getElementDimension(player) local model1 = getVehicleModelFromName(string.gsub(name,"_"," ")) local model2 = getVehicleModelFromName(tostring(name)) local new = xmlCreateChild(xml, "veh") local id = math.random(1,99999) if find_ then vehh = createVehicle(model1, px + 4, py, pz, rx, ry, rz) outputChatBox("Created a " .. getVehicleNameFromModel(model1) .. " with ID " .. tonumber(id) .. ".", player, 0, 255, 0, false) outputServerLog("[VEHICLE] [CMD/CREATEVEHICLE]: " .. getPlayerName(player) .. " created a " .. getVehicleNameFromModel(model1) .. " with ID " .. tonumber(id) .. ".") xmlNodeSetAttribute(new, "model", tonumber(model1)) else vehh = createVehicle(model2, px + 4, py, pz, rx, ry, rz) outputChatBox("Created a " .. getVehicleNameFromModel(model2) .. " with ID " .. tonumber(id) .. ".", player, 0, 255, 0, false) outputServerLog("[VEHICLE] [CMD/CREATEVEHICLE]: " .. getPlayerName(player) .. " created a " .. getVehicleNameFromModel(model2) .. " with ID " .. tonumber(id) .. ".") xmlNodeSetAttribute(new, "model", tonumber(model2)) end local vpx, vpy, vpz = getElementPosition(vehh) local vrx, vry, vrz = getElementRotation(vehh) xmlNodeSetAttribute(new, "id", tonumber(id)) xmlNodeSetAttribute(new, "posx", tonumber(vpx)) xmlNodeSetAttribute(new, "posy", tonumber(vpy)) xmlNodeSetAttribute(new, "posz", tonumber(vpz)) xmlNodeSetAttribute(new, "rotx", tonumber(vrx)) xmlNodeSetAttribute(new, "roty", tonumber(vry)) xmlNodeSetAttribute(new, "rotz", tonumber(vrz)) xmlNodeSetAttribute(new, "interior", tonumber(interior)) xmlNodeSetAttribute(new, "dimension", tonumber(dimension)) xmlNodeSetAttribute(new, "color1", tonumber(color1)) xmlNodeSetAttribute(new, "color2", tonumber(color2)) xmlNodeSetAttribute(new, "health", 1000) xmlNodeSetAttribute(new, "fuel", 100) xmlNodeSetAttribute(new, "engineState", 0) xmlNodeSetAttribute(new, "lightsState", 0) xmlNodeSetAttribute(new, "handbrakeState", 1) xmlNodeSetAttribute(new, "lockState", 0) xmlNodeSetAttribute(new, "factionid", 0) xmlNodeSetAttribute(new, "createdby", getPlayerName(player)) if owner then local target = exports.brpExports:findPlayer(owner, player) if target then local acc = getPlayerAccount(target) xmlNodeSetAttribute(new, "owner", getAccountName(acc)) setElementData(vehh, "vehicle.owner", getAccountName(acc)) else outputChatBox("Failed to set the owner. Default set.", player, 255, 0, 0, false) end else xmlNodeSetAttribute(new, "owner", 0) setElementData(vehh, "vehicle.owner", 0) end if tonumber(tint) == 0 then xmlNodeSetAttribute(new, "tinted", 0) elseif tonumber(tint) == 1 then xmlNodeSetAttribute(new, "tinted", 1) else xmlNodeSetAttribute(new, "tinted", 0) end xmlSaveFile(xml) xmlUnloadFile(xml) reload = xmlLoadFile("vehicles.xml") xmlSaveFile(reload) xmlUnloadFile(reload) -- Set current in-game datas setElementData(vehh, "vehicle.id", id) setElementData(vehh, "vehicle.engine", 0) setElementData(vehh, "vehicle.lights", 0) setElementData(vehh, "vehicle.lock", 0) setElementData(vehh, "vehicle.fuel", 100) setElementData(vehh, "vehicle.handbrake", 1) setElementData(vehh, "vehicle.faction", 0) setElementData(vehh, "factions.vehicle", 0) setElementData(vehh, "vehicle.tint", tint) setVehicleColor(vehh, tonumber(color1), tonumber(color2), 0, 0) else outputChatBox("Color values must be 0-126.", player, 255, 0, 0, false) end else outputChatBox("Syntax: /" .. cmd .. " []", player, 220, 220, 0, false) outputChatBox("If the vehicle name has spaces, just put on an underscore: _ and it will automaticly detect it.", player, 255, 255, 255, false) outputChatBox("Tints: 0 = false, 1 = true", player, 255, 255, 255, false) end end end ) Heres the function...
  10. Nope. For example i create a new veh when i create a new veh it add a new child in xml file with x y z , owner etc . When i want to park vehicle it get id of my occupied vehicle and search it in xml file. But i dont know how to reload that xml file and he cant find it. Once i restart the resource it works fine .
  11. Nope. For example i create a new veh when i create a new veh it add a new child in xml file with x y z , owner etc . When i want to park vehicle it get id of my occupied vehicle and search it in xml file. But i dont know how to reload that xml file and he cant find it. Once i restart the resource it works fine .
  12. Good ideea . i will try and i will post the result . Thanks.
  13. Good ideea . i will try and i will post the result . Thanks.
  14. I dont want the fix , i just want i ideea how to fix this thing ...
  15. I cant simply load xml file save it , and unload ? BTW: i changed vehicles.map extension in vehicles.xml extension. I cant use this functions ? xmlLoadFile xmlSaveFile xmlUnloadFile And btw vehicles ARE SAVED in that file . But i dont know how to reload xml file each time i created a new vehicle. Because once i created a new vehicle it add a new child in vehicles.xml . And for example if i want to park a vehicle just created it search in xml file vehicle with the same id with my occupied vehicle and modify his x y z in xml file. This isn't working if i dont restart resource. If i will create vehicle and i will restart resource and after that i will try to park vehicle , it work fine.
  16. Hi. I work a resource what save vehicles in a xml file. vehicles.map "416" id="4478" posx="1178.0419921875" posy="-1308.537109375" posz="14.001264572144" rotx="356.05041503906" roty="0.6591796875" rotz="269.79675292969" interior="0" dimension="0" color1="1" color2="3" health="1000" fuel="100" engineState="0" lightsState="0" handbrakeState="1" lockState="0" factionid="8573" createdby="st3f101" owner="-1" tinted="0"> For example i have 1 vehicle saved in xml file. I have a function what create a vehicle and save it in xml file.But the problem is : after i created a new vehicle it appear i xml file but i must restart the resource because xmlLoadFile dont reload the file. For example i create a vehicle . When i want to park that vehicle , it modifity in xml file x y z for that vehicle. If i dont restart the resource it cant find car in resource. After i restarted resource , all works fine. How i can fix that ? This is isn't working fine because my xml file is a .map file ?
  17. Hi. I work a resource what save vehicles in a xml file. vehicles.map "416" id="4478" posx="1178.0419921875" posy="-1308.537109375" posz="14.001264572144" rotx="356.05041503906" roty="0.6591796875" rotz="269.79675292969" interior="0" dimension="0" color1="1" color2="3" health="1000" fuel="100" engineState="0" lightsState="0" handbrakeState="1" lockState="0" factionid="8573" createdby="st3f101" owner="-1" tinted="0"> For example i have 1 vehicle saved in xml file. I have a function what create a vehicle and save it in xml file.But the problem is : after i created a new vehicle it appear i xml file but i must restart the resource because xmlLoadFile dont reload the file. For example i create a vehicle . When i want to park that vehicle , it modifity in xml file x y z for that vehicle. If i dont restart the resource it cant find car in resource. After i restarted resource , all works fine. How i can fix that ? This is isn't working fine because my xml file is a .map file ?
  18. Hi. I work a resource what save vehicles in a xml file. vehicles.map "416" id="4478" posx="1178.0419921875" posy="-1308.537109375" posz="14.001264572144" rotx="356.05041503906" roty="0.6591796875" rotz="269.79675292969" interior="0" dimension="0" color1="1" color2="3" health="1000" fuel="100" engineState="0" lightsState="0" handbrakeState="1" lockState="0" factionid="8573" createdby="st3f101" owner="-1" tinted="0"> For example i have 1 vehicle saved in xml file. I have a function what create a vehicle and save it in xml file.But the problem is : after i created a new vehicle it appear i xml file but i must restart the resource because xmlLoadFile dont reload the file. For example i create a vehicle . When i want to park that vehicle , it modifity in xml file x y z for that vehicle. If i dont restart the resource it cant find car in resource. After i restarted resource , all works fine. How i can fix that ? This is isn't working fine because my xml file is a .map file ?
  19. i want to edit vehicle what is occuped by source. How can i do that ? I dont know how to do that , can you give me an example ? for i,v in ipairs(getElementsByType("veh")) do local new = xmlFindChild(xml, "veh", i-1) if getElementData(vehicle, "vehicle.id") or 0 == xmlNodeGetAttribute(new, "id") then outputChatBox(i,player) local vpx, vpy, vpz = getElementPosition(vehicle) local vrx, vry, vrz = getElementRotation(vehicle) xmlNodeSetAttribute(new, "posx", vpx) xmlNodeSetAttribute(new, "posy", vpy) xmlNodeSetAttribute(new, "posz", vpz) xmlNodeSetAttribute(new, "rotx", vrx) xmlNodeSetAttribute(new, "roty", vry) xmlNodeSetAttribute(new, "rotz", vrz) xmlSaveFile(xml) xmlUnloadFile(xml) outputChatBox("Vehicle respawn position saved.", player, 220, 220, 0, false) outputServerLog("[VEHICLE] [CMD/PARK] " .. getPlayerName(player) .. " parked vehicle ID " .. getElementData(vehicle, "vehicle.id") .. " to " .. math.floor(vpx * 100) / 100 .. ", " .. math.floor(vpy * 100) / 100 .. ", " .. math.floor(vpz * 100) / 100 .. ".") setVehicleRespawnPosition(vehicle, vpx, vpy, vpz, vrx, vry, vrz) break end end This ? I want to find in that file in wich child i is car id in what i am and change position ... help , please ?
  20. addCommandHandler("setvehiclefaction", function(player, cmd, name, value) if exports.brpExports:isPlayerLeadAdmin(player) then if value then local vehicle = getPedOccupiedVehicle(player) if vehicle then setElementData(vehicle, "vehicle.faction", tonumber(value)) setElementData(vehicle, "factions.vehicle", tonumber(value)) setElementData(vehicle, "vehicle.owner", 0) setElementData(vehicle, "vehicle.tint", 0) for i,v in ipairs(getElementsByType("veh")) do local xml = xmlLoadFile("vehicles.map") local new = xmlFindChild(xml, "veh", 0) if tonumber(getElementData(v, "id")) == exports.brpExports:getIDVehicle(vehicle) then xmlNodeSetAttribute(new, "tinted", 1) xmlNodeSetAttribute(new, "owner", 0) xmlNodeSetAttribute(new, "factionid", value) xmlSaveFile(xml) xmlUnloadFile(xml) break end end outputChatBox(getPlayerName(player) .. "'s vehicle faction changed to " .. tonumber(value) .. ".", player, 220, 220, 0, false) outputServerLog("[VEHICLE] [CMD/SETVEHICLEFACTION]: " .. getPlayerName(player) .. " set " .. getPlayerName(player) .. "'s vehicle faction to " .. tonumber(value) .. ".") else outputChatBox("Player is not in a vehicle.", player, 255, 0, 0, false) end else outputChatBox("Syntax: /" .. cmd .. " ", player, 220, 220, 0, false) end end end ) xml file "416" id="91363" posx="1080.384765625" posy="574.166015625" posz="19.779340744019" rotx="359.24194335938" roty="358.69812011719" rotz="136.69738769531" interior="0" dimension="0" color1="1" color2="3" health="857" fuel="99" engineState="1" lightsState="0" handbrakeState="0" lockState="0" factionid="0" createdby="st3f101" owner="st3f101" tinted="1"> "416" id="3721" posx="1198.267578125" posy="-1331.52734375" posz="13.3984375" rotx="0" roty="0" rotz="166.51403808594" interior="0" dimension="0" color1="1" color2="3" health="1000" fuel="100" engineState="0" lightsState="0" handbrakeState="1" lockState="0" factionid="0" createdby="st3f101" owner="st3f101" tinted="1"> "416" id="86495" posx="1188.79296875" posy="-1326.890625" posz="13.574413299561" rotx="0" roty="0" rotz="293.36965942383" interior="0" dimension="0" color1="1" color2="3" health="1000" fuel="100" engineState="0" lightsState="0" handbrakeState="1" lockState="0" factionid="0" createdby="st3f101" owner="0" tinted="0"> "416" id="22245" posx="1199.4345703125" posy="-1318.2509765625" posz="13.3984375" rotx="0" roty="0" rotz="341.40811157227" interior="0" dimension="0" color1="1" color2="3" health="1000" fuel="100" engineState="0" lightsState="0" handbrakeState="1" lockState="0" factionid="0" createdby="st3f101" owner="0" tinted="0"> "445" id="6495" posx="1047.7626953125" posy="514.13671875" posz="19.8828125" rotx="0" roty="0" rotz="73.321136474609" interior="0" dimension="0" color1="1" color2="2" health="1000" fuel="100" engineState="0" lightsState="0" handbrakeState="1" lockState="0" factionid="0" createdby="SmK" owner="James_Coner" tinted="1"> No matter in what car i am . It modify only first child . Where and what's the problem ?
  21. stefutz101

    XML help

    addCommandHandler("setvehiclefaction", function(player, cmd, name, value) if exports.brpExports:isPlayerLeadAdmin(player) then if value then local vehicle = getPedOccupiedVehicle(player) if vehicle then setElementData(vehicle, "vehicle.faction", tonumber(value)) setElementData(vehicle, "factions.vehicle", tonumber(value)) setElementData(vehicle, "vehicle.owner", 0) setElementData(vehicle, "vehicle.tint", 0) for i,v in ipairs(getElementsByType("veh")) do local xml = xmlLoadFile("vehicles.map") local new = xmlFindChild(xml, "veh", 0) if tonumber(getElementData(v, "id")) == exports.brpExports:getIDVehicle(vehicle) then xmlNodeSetAttribute(new, "tinted", 1) xmlNodeSetAttribute(new, "owner", 0) xmlNodeSetAttribute(new, "factionid", value) xmlSaveFile(xml) xmlUnloadFile(xml) break end end outputChatBox(getPlayerName(player) .. "'s vehicle faction changed to " .. tonumber(value) .. ".", player, 220, 220, 0, false) outputServerLog("[VEHICLE] [CMD/SETVEHICLEFACTION]: " .. getPlayerName(player) .. " set " .. getPlayerName(player) .. "'s vehicle faction to " .. tonumber(value) .. ".") else outputChatBox("Player is not in a vehicle.", player, 255, 0, 0, false) end else outputChatBox("Syntax: /" .. cmd .. " ", player, 220, 220, 0, false) end end end ) xml file "416" id="91363" posx="1080.384765625" posy="574.166015625" posz="19.779340744019" rotx="359.24194335938" roty="358.69812011719" rotz="136.69738769531" interior="0" dimension="0" color1="1" color2="3" health="857" fuel="99" engineState="1" lightsState="0" handbrakeState="0" lockState="0" factionid="0" createdby="st3f101" owner="st3f101" tinted="1"> "416" id="3721" posx="1198.267578125" posy="-1331.52734375" posz="13.3984375" rotx="0" roty="0" rotz="166.51403808594" interior="0" dimension="0" color1="1" color2="3" health="1000" fuel="100" engineState="0" lightsState="0" handbrakeState="1" lockState="0" factionid="0" createdby="st3f101" owner="st3f101" tinted="1"> "416" id="86495" posx="1188.79296875" posy="-1326.890625" posz="13.574413299561" rotx="0" roty="0" rotz="293.36965942383" interior="0" dimension="0" color1="1" color2="3" health="1000" fuel="100" engineState="0" lightsState="0" handbrakeState="1" lockState="0" factionid="0" createdby="st3f101" owner="0" tinted="0"> "416" id="22245" posx="1199.4345703125" posy="-1318.2509765625" posz="13.3984375" rotx="0" roty="0" rotz="341.40811157227" interior="0" dimension="0" color1="1" color2="3" health="1000" fuel="100" engineState="0" lightsState="0" handbrakeState="1" lockState="0" factionid="0" createdby="st3f101" owner="0" tinted="0"> "445" id="6495" posx="1047.7626953125" posy="514.13671875" posz="19.8828125" rotx="0" roty="0" rotz="73.321136474609" interior="0" dimension="0" color1="1" color2="2" health="1000" fuel="100" engineState="0" lightsState="0" handbrakeState="1" lockState="0" factionid="0" createdby="SmK" owner="James_Coner" tinted="1"> No matter in what car i am . It modify only first child . Where what's the problem ?
  22. I already try that ... It stopped at that if ...
  23. stefutz101

    Question

    repairTimer = {} function repairVehicle (veh) if repairTimer[veh] then triggerClientEvent (source, "displayClientInfo", source,"Vehicle",getVehicleName(veh).." is currently being repaired!",255,22,0) return end if isElement(veh) and getElementType(veh)=="vehicle" then local health = math.floor(getElementHealth(veh)) repairTimer[veh] = setTimer(fixVehicleDayZ,(1000-health)*120,1,veh,source) setElementFrozen (veh,true) setElementData(veh,"repairer",source) setElementData(source,"repairingvehicle",veh) setPedAnimation (source,"SCRATCHING","sclng_r",nil,true,false) triggerClientEvent (source, "displayClientInfo", source,"Vehicle","You started to repair "..getVehicleName(veh),22,255,0) end end addEvent("repairVehicle",true) addEventHandler("repairVehicle",getRootElement(),repairVehicle) function fixVehicleDayZ(veh,player) setElementHealth(veh,1000) fixVehicle (veh) setPedAnimation(player,false) setElementFrozen (veh,false) repairTimer[veh] = nil setElementData(veh,"repairer",nil) setElementData(player,"repairingvehicle",nil) triggerClientEvent (player, "displayClientInfo", player,"Vehicle","You finished repairing "..getVehicleName(veh),22,255,0) end How i can test if vehicle explode then stop repair process ? With this functions if you start repair a car and it explode it will fix car anyway .. so i want to fix this thing. I try like this ... function stopFixxingWhileMoving(veh) if isElement(veh) and getElementType(veh)=="vehicle" then setPedAnimation(player,false) setElementFrozen (veh,false) repairTimer[veh] = nil setElementData(veh,"repairer",nil) setElementData(player,"repairingvehicle",nil) end end addEventHandler("onVehicleExplode",getRootElement(),stopFixxingWhileMoving) Thanks in advance !
  24. -- By default, the server will block the use of locally customized gta3.img player skins. This setting can be used to allow such mods. Not recommended for competitive servers. Values: none or peds ; default value: none --> none As you can see is already set to none , so player will get kick . Thanks
  25. So right now , if a player have img3 modified will get kick ?
×
×
  • Create New...