Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: funckcje
1. lua funckcje
Chce napisac skrypt na to,ze w nicku bedzie zawieralo slowo np. |cos|Nick i zeby nadawalo tej osobie hajs, jakie funkcje uzyc?
2. Podpięcie skryptu pod mysql + funckcje
Witam mam taki skrypt na taxi i chcia?bym go podpi?? pod mysql i dodac funkcje typu sprawdza czy gracz jest zapisany w tabeli

kod :
[lua]local allow_vehs={
[420]=true,
}

local vehs={
{-1987.56555, 160.60571, 27.17412},
}

taxi={}

for k,v in ipairs(vehs)do
taxi[k]=createVehicle(420,v[1],v[2],v[3])
setElementData(taxi[k],"vehicle:taxi",true)
end

addEventHandler("onPlayerVehicleEnter",root,function(veh,seat)
if seat==0 then
if allow_vehs[getElementModel(veh)] then
if getElementData(veh,"vehicle:taxi") then
outputChatBox("*Zosta?e?(a?) taks?wkarzem. Dostaniesz informacj? o po?o?eniu klienta po wezwaniu us?ugi.",source,255,255,255)
setElementData(source,"player:taxi",true)
end
end
end
if allow_vehs[getElementModel(veh)] then
if getElementData(veh,"vehicle:taxi") then
setElementData(source,"taxi",false)
end
end
end)

addEventHandler("onPlayerVehicleExit",root,function(veh,seat)
if seat==0 then
if allow_vehs[getElementModel(veh)] then
if getElementData(veh,"vehicle:taxi") then
respawnVehicle(veh)
setElementData(source,"player:taxi",false)
end
end
end
end)



addCommandHandler("taxi",function(plr)
if getElementData(plr,"taxi") then
return outputChatBox("*Zam?wi?e?(a?) ju? us?ug?. Poczekaj cierpliwie na taks?wk?",plr,255,255,0)
end
count={}
f...