Witamy na GTAOnline Obecny czas to 2017-02-22, 04:53 Użytkowników: 68639
Strona główna | Użytkownicy | Grupy | Faq | Regulamin | Zaloguj

GTAONLINE.PL
Tematy otagowane jako: server.lua
1. Jak Zrobić Server.lua Do Tego Skryptu
[lua]

local districtsBus = {

{45.83,1201.23,18.81},
{-66.73,1201.60,19.59},
{-68.33,1148.97,19.59},
{24.26,1144.16,19.59},
{26.12,1102.61,19.59},
{-65.06,1101.15,19.59},
{-185.69,1100.93,19.60},
{-188.17,1193.49,19.55},
{-115.97,1196.37,19.59},
{-117.24,1251.94,17.41},
{-73.71,1256.68,12.09},
{64.41,1220.31,18.83},

}

local jobTarget
local jobMarker
local jobVehicle
local maxTarget = #districtsBus

function finishJob()
if jobMarker and isElement(jobMarker) then
destroyElement(jobMarker)
jobMarker = nil
end

if jobTarget and isElement(jobTarget) then
destroyElement(jobTarget)
jobTarget = nil
jobTarget = 0

end

triggerServerEvent("destroyVeh", localPlayer)

end


function busDriver(el, md)
if el ~= localPlayer or not md then return end
if jobTarget > maxTarget and getPedOccupiedVehicle(el) then return end
if jobTarget == maxTarget and not getPedOccupiedVehicle(el) then return end

if jobTarget == #districtsBus then
finishJob()
playSoundFrontEnd(5)
outputChatBox("* Zakończyłeś/aś pracę.")
else
showMarker()
playSoundFrontEnd(12)
triggerServerEvent("givePlayerMoney", localPlayer, 3, 0)
end
end

function showMarker()
if jobMarker and isElement(jobMarker) then
destroyElement(jobMa...
2. Jak Napisać server.lua
Jak Napisać?

Plik Client

[lua]
local districtsBus = {

{-114.79,1152.61,19.59},
{-113.12,1164.50,19.59},
{-113.60,1199.11,19.59},
{-127.06,1201.98,19.58},
{-196.87,1199.95,19.59},
{-197.96,1098.40,19.59},
{-198.57,1004.90,19.57},
{-296.61,813.30,14.57},
{-126.70,818.83,20.83},
{-126.26,757.93,20.73},
{-290.20,687.47,18.60},
{-228.52,623.31,10.01},
{-144.33,629.61,2.10},
{-128.91,535.68,7.17},
{-94.20,540.26,6.87},
{18.04,619.35,8.39},
{157.71,694.35,6.12},
{259.92,725.92,7.96},
{342.65,699.74,8.53},
{350.67,706.68,8.64},
{281.32,853.33,19.40},
{221.27,990.38,28.25},
{188.80,1142.70,14.67},
{161.58,1158.86,14.58},
{119.18,1201.64,18.23},
{-44.09,1201.39,19.21},
{-116.03,1201.02,19.59},
{-119.11,1155.33,19.59},
{-141.06,1151.08,19.59},
{-143.07,1128.69,19.75},
}

local jobTarget
local jobMarker
local jobVehicle
local maxTarget = #districtsBus

function finishJob()
if jobMarker and isElement(jobMarker) then
destroyElement(jobMarker)
jobMarker = nil
end

if jobTarget and isElement(jobTarget) then
destroyElement(jobTarget)
jobTarget = nil
jobTarget = 0

end

triggerServerEvent("destroyVeh", localPlayer)

end


function busDriver(el, md)
if el ~= localPlayer or not md then return end
if jobTarget > maxTarget...
3. Z client.lua zrobić server.lua
Witam Czy jest możliwość z Clienta.lua dorobić Server.lua.Jeżeli tak to jak ?

Za pomoc piwka :)




phpBB by Przemo modified by xXx 2003-2016

Template GTAONLINE created by gtaonline.pl



Strona wygenerowana w 0,05 sekundy. Zapytań do SQL: 8