Szerző Téma: Re:Szerelő Frakció  (Megtekintve 390 alkalommal)

Nem elérhető Toxic

  • 798
  • #elfújalágyszellő
    • Profil megtekintése
Re:Szerelő Frakció
« Dátum: 2016. Február 12. - 23:36:05 »
0 Show voters
fixVehicle + if elágazás

Nem elérhető Toxic

  • 798
  • #elfújalágyszellő
    • Profil megtekintése
Re:Szerelő Frakció
« Válasz #1 Dátum: 2016. Február 15. - 22:36:04 »
0 Show voters
Szerver oldal:
 
function fixVehicle(source, commandName, target)
if (getElementData(source, \"faction\") == 1) then --frakció ID-t értelemszerűen átírod
if not (target) then
   outputChatBox(\"Használat: /\".. commandName..\" [iD/NÉV]\", source)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(source, target)
   local vehicle = getPedOccupiedVehicle(target)
   if (vehicle) then
      fixVehicle(vehicle)
      setElementData(vehicle, \"enginebroke\", 0)
   end
end
end
end
addCommandHandler(\"fix\", fixVehicle, false, false)|

Nem elérhető Toxic

  • 798
  • #elfújalágyszellő
    • Profil megtekintése
Re:Szerelő Frakció
« Válasz #2 Dátum: 2016. Február 15. - 22:36:45 »
0 Show voters
Szerver oldal:
 
function fixVehicle(source, command, target)
if (getElementData(source, \"faction\") == 1) then --frakció ID-t értelemszerűen átírod
if not (target) then
   outputChatBox(\"Használat: /\".. command ..\" [iD/NÉV]\", source)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(source, target)
   local vehicle = getPedOccupiedVehicle(target)
   if (vehicle) then
      fixVehicle(vehicle)
      setElementData(vehicle, \"enginebroke\", 0)
   end
end
end
end
addCommandHandler(\"fix\", fixVehicle, false, false)|

Nem elérhető Toxic

  • 798
  • #elfújalágyszellő
    • Profil megtekintése
Re:Szerelő Frakció
« Válasz #3 Dátum: 2016. Február 15. - 22:37:11 »
0 Show voters
Szerver oldal:
 
function fixVehicle(source, command, target)
if (getElementData(source, \"faction\") == 1) then --frakció ID-t értelemszerűen átírod
if not (target) then
   outputChatBox(\"Használat: /\".. command ..\" [iD/NÉV]\", source)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(source, target)
   local vehicle = getPedOccupiedVehicle(target)
   if (vehicle) then
      fixVehicle(vehicle)
      setElementData(vehicle, \"enginebroke\", 0)
   end
end
end
end
addCommandHandler(\"fix\", fixVehicle, false, false)

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal