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: uszkodzen
1. Zapis, odczyt uszkodzen pojazdu mysql
Witam, w jaki spos?b mog? zapisa? w jednej kolumnie uszkodzenia pojazdu?
Oczywi?cie w mysql.
Oraz jakim sposobem wczyta? je z tej kolumny.
Chodzi o to ?eby zapisa? w jednej kolumnie "panelstates" wszystkie uszkodzenia bo z tego co wiem zapisuj? one si? z przecinkami lecz jak wtedy pobra? te dane bez przecink?w i wczyta??
2. zapis uszkodzen
Witajcie !

Jak zrobi? zapis tuningu i uszkodze? w tym kodzie ?

[lua]
function(id, cost, name)
if (getPlayerMoney (source) >= tonumber(cost)) then
outputChatBox ("Kupiles woz " .. name, source, 255, 0, 0, false)
outputChatBox ("ID pojazdu: " .. id, source, 255, 0, 0, false)
outputChatBox ("Koszt: " .. cost, source, 255, 0, 0, false)
takePlayerMoney (source, tonumber (cost))
setAccountData (getPlayerAccount (source), "funmodev2-car", tonumber(id))
setAccountData (getPlayerAccount (source), "funmodev2-paintjob", 3)
setAccountData (getPlayerAccount (source), "funmodev2-carupg", 0)
else
outputChatBox ("Nie posiadasz tyle kasy!", source, 255, 0, 0, false)
end
end)


addEvent ("carSpawn", true)
addEvent ("carDestroy", true)


function carSpawn ()
if not (isGuestAccount (getPlayerAccount (source))) and not (isPedInVehicle(source)) then
if (getElementData (source, "hisCar")) and (getElementData (source, "hisCar") ~= nil) and (getElementType(getElementData (source, "hisCar")) == "vehicle") then
setElementVelocity (getElementData (source, "hisCar"), 0,0,0)
local x,y,z = getElementPosition (source)
setVehicleRotation (getElementData (source, "hisCar"), 0, 0, 0)
setElementPosition (getElementData (source, "hisCar"), x+2,y,z +1)
...
3. [INNE] Przywrocenie uszkodzen samochodu
Witam, potrzebuje funkcje kt?ra b?dzie zmienia? karoserie na uszkodzon? z bazy danych.Wie kto? kt?ra to funkcja za to odpowiada ? ?e np maske gniecie albo drzwi itp?