GTA Közösség - A magyar GTA fórum

Hatalmas Archívum => Fórum Archívum (Témák/Fórumok) => A témát indította: Toxic - 2016. február 12. - 23:36:05

Cím: Re:Szerelő Frakció
Írta: Toxic - 2016. február 12. - 23:36:05
fixVehicle + if elágazás
Cím: Re:Szerelő Frakció
Írta: Toxic - 2016. február 15. - 22:36:04
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)|
Cím: Re:Szerelő Frakció
Írta: Toxic - 2016. február 15. - 22:36:45
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)|
Cím: Re:Szerelő Frakció
Írta: Toxic - 2016. február 15. - 22:37:11
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)