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: przepisywanie
1. Przepisywanie samochodów na organizacje
Witam nie dzia?a mi przepisywanie aut na moj? organizacj? nie wiem czemu w db3 nie ma nic:

s_org:

[code]
--[[
Developed by Yolos . You dont have agree to use this code! ;3
]]
function refreshgui(element)
local uid=getElementData(element,"player:sid")
if not uid then return end
local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_vehicles WHERE ownedPlayer=?", uid)
triggerClientEvent(element, "org:refresh", resourceRoot, result)
end

addEvent("org:check", true)
addEventHandler("org:check", resourceRoot, function(id,name)
-- Pobieramy SID gracza
local uid=getElementData(client,"player:sid")
if not uid then return end
-- Sprawdzamy czy jest jeszcze w?‚a?›cicielem
local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_vehicles WHERE id=? AND ownedPlayer=?", id, uid)
if #result < 0 then
outputChatBox("#ff0000✘ #ffffffNie jeste?› w?‚a?›cicielem pojazdu.", client, 255, 0, 0, true)
return
end
local org = getElementData(client,"player:organization")
if not org then outputChatBox("* Nie jeste?› w organizacji !",client,255,0,0) return end
local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_vehicles WHERE id=? AND parking=0", id, org)
if #result > 0 then
outputChatBox("#ff0000✘ #ffffffPojazd nie znajd...
2. Przepisywanie poj. na organizacje
Potrzebuje pomocy gdy? nigdzie nie mog? znale?? skryptu na przepisywanie poj. na org. dacie mi podgl?d jak to zrobi? czy link do tego skryptu?
3. Przepisywanie pojazdow na org
Poda mi ktos gotow? komende na przepisywanie pojazdow na organizacje z ogrpg jakiegos? bo ja nie moge znalezc.
4. Pys przepisywanie pojazdów
Siema czy kto? pomo?e dlaczego gdy kto? przepisze pojazd na organizacj? to cz?onek nie mo?e do niego wsi????
5. przepisywanie pojazdow do organizacji
Witam przychodze z problem, i? normalnie moge dodac auto do organizacji kazdy moze jezdzic ale gdy odpuszam organizacje lub mnie wyrzuca to moje auta sa dalej do niej przypisane i kazdy wciaz moze z nich korzystac. Za pomoc daje piwka :)

KOD
[lua]local zaproszenia = {}
local max_people_in_org = 55 ---- MAKSYMALNA LICZBA LUDZI W ORGANIZACJI!
function findPlayer(plr,cel)
local target=nil
if (tonumber(cel) ~= nil) then
for _,thePlayer in ipairs(getElementsByType("player")) do
if getElementData(thePlayer,"player:sid") == tonumber(cel) then target = thePlayer end
end
else -- podano fragment nicku
for _,thePlayer in ipairs(getElementsByType("player")) do
if string.find(string.gsub(getPlayerName(thePlayer):lower(),"#%x%x%x%x%x%x", ""), cel:lower(), 0, true) then
if (target) then
outputChatBox("* Znaleziono wiecej niz jednego gracza o pasujacym nicku, podaj wiecej liter.", plr)
return nil
end
target=thePlayer
end
end
end
if target and getElementData(target,"p:inv") then return nil end
return target
end

addEvent("lidero:editUser", true)
addEventHandler("lidero:editUser", resourceRoot, function(text,rank,faction)
local result1=exports["pystories-db"]:dbGet("SELECT * FROM pystories_users WHERE id=?", text)
if not result1 or #result1 < 0 then outputChatBox("* Podany u?ytkownik nie istnieje w baz...
6. przepisywanie pojazdu zamiast sprzedaży

function playerCarSell sourcecmd)
    if(
isPedInVehicle(source)) then
           local playercar 
getPedOccupiedVehicle source )
        if(
getElementData cars[i], "owner" ) == getAccountName(getPlayerAccount(source))) then
               setElementData 
(playercar,"owner","Nobody")
            
givePlayerMoney sourcegetElementData playercar"price" )/100*25 )
            
outputChatBox ("Sprzedano pojazd!",source243,149,72 )
              
saveCars()
        else
            
outputChatBox ("To nie twoje auto!!!",source255,255,127 )
        
end
    
else
        
outputChatBox ("Nie jestes w aucie!!!",source255,255,127 )
    
end
end

addCommandHandler 
("sprzedajauto",playerCarSell)



Ca?o?c polega na tym, aby w?a?ciciel wpisuj?c /sprzedajauto (nick kupca) przepisuje samoch?d na kogos innego.
7. [DM] przepisywanie id pojazdu
Witam jest jaka? funkcja czy jak to zrobi? ?eby przepisywa? id pojazdu... hmm jak to wyt?umaczy? ?eby sama zapisywa?a id ...

CreateVehicle(kupioneaut, . . . . );

A potem jak bym robi? zamiast kupione auto mia?o id?
no bo jak
djSetInt(pojazdy(dane), "id" --> to tutaj mi daje kupioneauto a ja chcia?bym ?eby samo zmieni?o sobie na id pojazdu...