Sziasztok!
Azt szeretném megkérdezni, hogy ha createVehicle függvénnyel lehívok egy kocsit akkor abba miért nem lehet beszállni?
function hberles()
local money = getPlayerMoney()
if( money >= 648) then
outputChatBox(\"Sikeresen kibéreltél egy hajót 1 órára. Ügyelj hogy hozd vissza!\")
createVehicle ( 430, 658, -1890, 3 + 10)
takePlayerMoney(648)
end
local money = getPlayerMoney()
if( money < 648) then
outputChatBox(\"Sajnos nincs elegendő pénzed a bérléshez! A hajóbérlés 648$-ba kerül!\", 255, 0, 0)
end
end
addCommandHandler(\"berel\", hberles)
Gondolom nem kell mondanom, h server file. Ha ez nem fog működni, akkor egy külső script tiltja le azt az eventet, amikor beszállsz egy kocsiba(onVehicleEnter).
createVehicle ( 430, 658, -1890, 3 + 10)
function hberles(thePlayer)
local money = getPlayerMoney(thePlayer)
if( money >= 648) then
outputChatBox(\"Sikeresen kibéreltél egy hajót 1 órára. Ügyelj hogy hozd vissza!\", thePlayer, 255, 255, 255)
takePlayerMoney(thePlayer, 648)
elseif ( money <= 648) then
outputChatBox(\"Sajnos nincs elegendő pénzed a bérléshez! A hajóbérlés 648$-ba kerül!\", thePlayer, 255, 255, 255)
end
end
addCommandHandler(\"berel\", hberles)