Lua
[i]function park(theOwner,cmd)
if (isPedInVehicle (theOwner)) then
local veh = getPedOccupiedVehicle(theOwner)
local Owner = getElementData(veh, "Owner")
local Slot = getElementData(veh, "OwnerSlot")
local x,y,z = getElementPosition(veh)
local rx,ry,rz = getVehicleRotation (veh)
local Color1, Color2, Color3, Color4 = getVehicleColor(veh)
outputChatBox(""..Color1..","..Color2..","..Color3..","..Color4.."")
if (theOwner == getPlayerFromName(Owner)) then
tabler = mysql_query(sqlcon, "UPDATE car_data SET X='"..x.."', Y='"..y.."', Z='"..z.."', RX='"..rx.."', RY='"..ry.."', RZ='"..rz.."', Tuning='0', s1Color='"..Color1.."', s2Color=='"..Color2.."', s3Color=='"..Color3.."' WHERE`Owner` = '"..getPlayerName(theOwner).."' AND `OwnerSlot` = '"..Slot.."'");
outputChatBox("Du hast das Fahrzeug erfolgreich geparkt!", theOwner,0,255,0)
else
outputChatBox("Du kannst dieses Auto nicht parken!", theOwner,255,0,0)
end
end
end
addCommandHandler("park", park)[/i]
Alles anzeigen
Die Farben in den Tabs "s1Color" "s2Color" und "s3Color" kann ich Abfragen
aber wen ich darin was neues Speichern will bleibt es trotzdem auf 0!
Es kommen keine Errors...
Weis einer warum?