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: tutaj
1. Nie wiem jak tutaj dodać rotację pojazdu
Siemanko tak jak w temacie nie wiem jak doda? rotacje pojazdem
[lua]createBlip(-1959.59, 285.91, 35.47, 55,2,0,0,0,0,0,275) --- sf doherty zwykly
createBlip(-1641.25, 1203.88, 7.25, 55,2,0,0,0,0,0,275) --- sf downtown sportowy
createBlip(1880.92, -1863.27, 13.58, 55,2,0,0,0,0,0,275) --- cygan

local vehicles = {}
local komis_shapes = {}
local slots = {

{-1953.35, 306.55, 40.64, 537.4, 0.0, 179.6, model=521, dmax=0, dmin=0, price=(25000000), gdzie="sf"}, -- FCR 900
{-1956.45, 306.28, 40.64, 537.4, 0.0, 179.8, model=581, dmax=0, dmin=0, price=(23000000), gdzie="sf"}, -- BF
{-1952.58, 300.26, 40.59, 89.1, 0.0, 91.0, model=463, dmax=0, dmin=0, price=(4000000), gdzie="sf"}, -- Freeway
{-1952.72, 295.79, 40.59, 89.1, 0.0, 88.4, model=471, dmax=0, dmin=0, price=(5000000), gdzie="sf"}, -- QuadBike
{-1952.91, 291.28, 40.59, 89.1, 0.0, 91.0, model=461, dmax=0, dmin=0, price=(3200000), gdzie="sf"}, -- PCJ

-- Salon LV Sportowy
{-1662.96, 1221.65, 13.26, 230, 0, 0, model=415, dmax=0, dmin=0, price=(79000000), gdzie="dohertysf2"}, -- cheetah
{-1649.00, 1207.89, 13.34,65, 0.0, 0.0, model=560, dmax=0, dmin=0, price=(45500000), gdzie="dohertysf2"}, -- Sultan
{-1649.99, 1207.60, 20.78,65, 0.0, 0.0, model=541, dmax=0, dmin=0, price=(83200000), gdzie="dohertysf2"}, -- hto
{-1663.46, 1221.50, 20.86,230, 0.0, 0.0, model=451, dmax=0, dmin=0,price=(80200000), gdzie="dohertysf2"...
2. Chciałem edytować tutaj kordy odpalam
Siema mam taki problem jak odpalam coledit tp nie mog? w??czy? sphere czy jest na to skrypt na sphere

local cs_resp createColSphere(-2124.23,-34.54,35.32)
3. Nie wiem jak tutaj dodać zarobki dla premium
Siema tak jak w temacie

                zarobek math.random(15000,20000)
                
exports.noti:showBox("error","Za piel?gnacje ro?lin otrzymujesz "..zarobek.." PLN")
                
triggerServerEvent("givePlayerMoney"localPlayerzarobek0)  
4. Jak dodać tutaj pojazd inny niż holownik
Siema jak doda? tutaj inny pojazd ni? holownik

addEventHandler("onMarkerHit",oddanie,function(el,md)
if 
getElementType(el) ~= "player" then return end
local veh 
getPedOccupiedVehicle(el)
if 
not veh then return end
if veh and getElementModel(veh) ~= 525 or getElementModel(veh) ~= 578 then return end
local duty 
getElementData(el,"player:faction")
if 
not duty or (duty and duty ~= "SARA"then return end
local tow 
getVehicleTowedByVehicle(veh)
if 
not tow then return end
triggerClientEvent
(el,"glownyparking:refresh",root,tow)
end)
addEventHandler("onMarkerLeave",oddanie,function(el,md)
if 
getElementType(el) ~= "player" then return end
local veh 
getPedOccupiedVehicle(el)
if 
not veh then return end
if veh and getElementModel(veh) ~= 525 or getElementModel(veh) ~= 578 then return end
local duty 
getElementData(el,"player:faction")
if 
not duty or (duty and duty ~= "SARA"then return end
local tow 
getVehicleTowedByVehicle(veh)
if 
not tow then return end
triggerClientEvent
(el,"glownyparking:chowaj",root)
end)
5. Jak dodać tutaj inny pojazd niż holownik
Siema mam problem bo nie wiem jak tutaj doda? lawety mo?ecie i pod innom frakcje sara pom?c postawie piwo

addEventHandler("onMarkerHit",oddanie,function(el,md)
if 
getElementType(el) ~= "player" then return end
local veh 
getPedOccupiedVehicle(el)
if 
not veh then return end
if veh and getElementModel(veh) ~= 525 then return end
local duty 
getElementData(el,"player:faction")
if 
not duty or (duty and duty ~= "SAPD"then return end
local tow 
getVehicleTowedByVehicle(veh)
if 
not tow then return end
triggerClientEvent
(el,"glownyparking:refresh",root,tow)
end)
addEventHandler("onMarkerLeave",oddanie,function(el,md)
if 
getElementType(el) ~= "player" then return end
local veh 
getPedOccupiedVehicle(el)
if 
not veh then return end
if veh and getElementModel(veh) ~= 525 then return end
local duty 
getElementData(el,"player:faction")
if 
not duty or (duty and duty ~= "SAPD"then return end
local tow 
getVehicleTowedByVehicle(veh)
if 
not tow then return end
triggerClientEvent
(el,"glownyparking:chowaj",root)
end)
6. Co tutaj jest źle?
function cmd_thru (playercommandvalue)

if (
tonumber(value)==nilthen
outputChatBox
("Uzyj: /thru <ile>"player)
return
end

local e
=player
if getCameraTarget(player)~=player then
e
=getCameraTarget(player)
end


if (isPedInVehicle(player)) then
e
=getPedOccupiedVehicle(e)
end

local x
,y,z=getElementPosition(e)
local _,_,rz=getElementRotation(e)

local rrz=math.rad(rz)
local x+ (value math.sin(-rrz))
local y+ (value math.cos(-rrz))

setElementPosition(e,x,y,z)
end

addCommandHandler
"thru"cmd_thrutruefalse )
[code]

Nie wiem co jest tutaj ?le, ale bardzo prosz? o pomoc, bo d?ugo tego szuka?em.
Kiedy wpisuj? komend? /thru np.10, to wy?wietla si? napis /thru <ilo??>
Za pomoc leci piwo!
7. Czy coś tutaj jest źle?
Napisa?em taki skrypt na teleport poprzez komende:
function gog ()
outputChatBox "* Teleportujesz Si? Pod Prac? Dorywcz? Google *"
setElementPosition( source, 852.79772949219, -585.22314453125, 18.093042373657 )
end
addCommandHandler ("wm1", gog)
Ale Wy?wietla si?, tylko Tekst z output'a, a nie teleprtuj? mnie :(
8. Co tutaj jest nie tak.
Wywala b??d z linijk? getElementHealth z pierwszym argumentem oraz 'if hp <= 75 then'

kod po stronie srv


function bw(localPlayer)
    
local hp getElementHealth(localPlayer)
    if 
hp <= 75 then
        outputChatBox
("Posiadasz bw"localPlayer)
        
setPedAnimation(localPlayer"CRACK""crckdeth2")
    
end
end
addEventHandler
("onPlayerDamage"getRootElement(), bw)
9. Proszę o sprawdzenie, co tutaj można poprawić :)
Uprzejmie prosz? o sprawdzenie tego kodu pod wzgl?dem poprawno?ci.
Jestem pocz?tkuj?cy i prawdopodobnie pope?ni?em jakie? podstawowe b??dy.
Z g?ry dzi?kuj? za pomoc, EmilX :)

--> Kod <--
10. Coś mi tutaj nie styka
Siemanko, Zn?w potrzebuje waszej pomocy mianowicie w mabako serwice z caomunity ;/ nie sa widoczen blipy nma f11 wiesz moze jak to ustawic? Dostalem system paczek, calkiem dobry, lecz gdy po kliknieciu zaladuj, pasek sie laduje i okno nie znika, natomiast pozniej nie mam twoaru na aucie, nie da sie go rozladowac :

To jest client.lua:






a to jest serwer .lua :
[quote]
addEvent("zaladuj", true)
addEventHandler("zaladuj", getRootElement(), function(player, towar, cel)
setElementData(player, "towar", tonumber(towar))
setElementData(player, "czas", false)
setElementData(player, "cel", tonumber(cel))
triggerClientEvent("msgBox", getRootElement(), player, "Zaladowales towar!")
setTimer(function() setElementData(player, "czas", true) triggerClientEvent("msgBox", getRootElement(), player, "Juz mozesz rozladowac towar!") end, 180000, 1)
end)

addEvent("rozladuj", true)
addEventHandler("rozladuj", getRootElement(), function(player)
local akt = getElementData(player, "towar")

if akt == 1 then
wyplata = math.random(100, 250)
end
if akt == 2 then
wyplata = math.random(300, 400)
end
if akt == 3 then
wyplata = math.random(500, 600)
end
if akt == 4 then
wyplata = math.random(600, 700)
end
if akt == 5 then
wyplata = math.random(1000, 1200)
end
if akt == 6 then
wyplata = math.random(800, 850)
end
if akt == 7 then
w...