Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2014-06-21, 22:07


ThomasIPG







Wiek: 30
Na forum: 4389 dni
Posty: 12
Nick w MP: Thomas

Piwa: 17

Respekt: 50

Witam chcia?bym linijke kodu kt?ra zapisywa?a mi pozycje pojazdu i wczytywa?a pojazd po restartcie skryptu
Linijka co daje auto na konto po zakupie
function onBuyCar(sPlayer)
  if getPlayerAccount(sPlayerthen
    if isPedInVehicle(sPlayerthen
        if getElementData(getPedOccupiedVehicle(sPlayer),"vehicle:owner")==0 then
        if getPlayerMoney(sPlayer)>=tonumber(getElementData(getPedOccupiedVehicle(sPlayer),"vehicle:cost")) then
            setElementData(getPedOccupiedVehicle(sPlayer),"vehicle:owner",getPlayerAccount(sPlayer))
                setElementData(getPedOccupiedVehicle(sPlayer),"ownername",getPlayerName(sPlayer))
                takePlayerMoney(sPlayer,getElementData(getPedOccupiedVehicle(sPlayer),"vehicle:cost"))
                setVehicleEngineState(getPedOccupiedVehicle(sPlayer),true)
                setElementFrozen(getPedOccupiedVehicle(sPlayer),false)
                setElementData(getPedOccupiedVehicle(sPlayer),"ownername",getPlayerName(sPlayer))
                outputChatBox("#63DBFF*Kupi?e? pojazd #B9F46C"..getVehicleName(getPedOccupiedVehicle(sPlayer)).."#63DBFF za #B9F46C"..getElementData(getPedOccupiedVehicle(sPlayer),"vehicle:cost").."$#63DBFF.",sPlayer,0,0,0,true)
                local xygetElementPosition(getPedOccupiedVehicle(sPlayer))
                local blip createBlip(x,y,z,0,1,0,0,255,255,0,65535,sPlayersetElementData(blip,"blip:vehicle",getPedOccupiedVehicle(sPlayer))
                else outputChatBox("#63DBFF*Niemasz wystarczaj?co du?o pieni?dzy ?eby kupi? ten #B9F46C"..getVehicleName(getPedOccupiedVehicle(sPlayer)).."#63DBFF.",sPlayer,0,0,0,true)
            end
        end
        else outputChatBox("#63DBFF*Musisz by? zalogowany.",sPlayer,0,0,0,true)
end
  end
end


I do tego musi by? komenda /zaparkuj po kt?rej zapisuje ownera i pozycje poczym po restartcie dalej gracz jest ownerem pojazdu.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-21, 22:47


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4394 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

To nie jeest forum do robienia skrypt?w za kogo?. Da?em kod na zapis pojazd?w w poprzednim temacie, poszukaj.

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Tagi: zapis :: aut
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku