Gabriele01

Members
  • Content Count

    63
  • Joined

  • Last visited

Community Reputation

11 Decent

About Gabriele01

  • Rank
    Snitch

Details

  • Location
    Turkey
  • Occupation
    Bane
  • Interests
    Programming and type a script.

Recent Profile Visitors

813 profile views
  1. function createsql () executeSQLQuery("CREATE TABLE IF NOT EXISTS carslot1 (PlayerName TEXT, Model NUMERIC, Cost NUMERIC, Paintjob NUMERIC, Color TEXT, Upgrade0 NUMERIC, Upgrade1 NUMERIC, Upgrade2 NUMERIC, Upgrade3 NUMERIC, Upgrade4 NUMERIC, Upgrade5 NUMERIC, Upgrade6 NUMERIC, Upgrade7 NUMERIC, Upgrade8 NUMERIC, Upgrade9 NUMERIC, Upgrade10 NUMERIC, Upgrade11 NUMERIC, Upgrade12 NUMERIC, Upgrade13 NUMERIC, Upgrade14 NUMERIC, Upgrade15 NUMERIC, Upgrade16 NUMERIC)") executeSQLQuery("CREATE TABLE IF NOT EXISTS carslot2 (PlayerName TEXT, Model NUMERIC, Cost NUMERIC, Paintjob NUMERIC, Color TEXT, Upgrade0 NUMERIC, Upgrade1 NUMERIC, Upgrade2 NUMERIC, Upgrade3 NUMERIC, Upgrade4 NUMERIC, Upgrade5 NUMERIC, Upgrade6 NUMERIC, Upgrade7 NUMERIC, Upgrade8 NUMERIC, Upgrade9 NUMERIC, Upgrade10 NUMERIC, Upgrade11 NUMERIC, Upgrade12 NUMERIC, Upgrade13 NUMERIC, Upgrade14 NUMERIC, Upgrade15 NUMERIC, Upgrade16 NUMERIC)") executeSQLQuery("CREATE TABLE IF NOT EXISTS carslot3 (PlayerName TEXT, Model NUMERIC, Cost NUMERIC, Paintjob NUMERIC, Color TEXT, Upgrade0 NUMERIC, Upgrade1 NUMERIC, Upgrade2 NUMERIC, Upgrade3 NUMERIC, Upgrade4 NUMERIC, Upgrade5 NUMERIC, Upgrade6 NUMERIC, Upgrade7 NUMERIC, Upgrade8 NUMERIC, Upgrade9 NUMERIC, Upgrade10 NUMERIC, Upgrade11 NUMERIC, Upgrade12 NUMERIC, Upgrade13 NUMERIC, Upgrade14 NUMERIC, Upgrade15 NUMERIC, Upgrade16 NUMERIC)") executeSQLQuery("CREATE TABLE IF NOT EXISTS carslot4 (PlayerName TEXT, Model NUMERIC, Cost NUMERIC, Paintjob NUMERIC, Color TEXT, Upgrade0 NUMERIC, Upgrade1 NUMERIC, Upgrade2 NUMERIC, Upgrade3 NUMERIC, Upgrade4 NUMERIC, Upgrade5 NUMERIC, Upgrade6 NUMERIC, Upgrade7 NUMERIC, Upgrade8 NUMERIC, Upgrade9 NUMERIC, Upgrade10 NUMERIC, Upgrade11 NUMERIC, Upgrade12 NUMERIC, Upgrade13 NUMERIC, Upgrade14 NUMERIC, Upgrade15 NUMERIC, Upgrade16 NUMERIC)") executeSQLQuery("CREATE TABLE IF NOT EXISTS carslot5 (PlayerName TEXT, Model NUMERIC, Cost NUMERIC, Paintjob NUMERIC, Color TEXT, Upgrade0 NUMERIC, Upgrade1 NUMERIC, Upgrade2 NUMERIC, Upgrade3 NUMERIC, Upgrade4 NUMERIC, Upgrade5 NUMERIC, Upgrade6 NUMERIC, Upgrade7 NUMERIC, Upgrade8 NUMERIC, Upgrade9 NUMERIC, Upgrade10 NUMERIC, Upgrade11 NUMERIC, Upgrade12 NUMERIC, Upgrade13 NUMERIC, Upgrade14 NUMERIC, Upgrade15 NUMERIC, Upgrade16 NUMERIC)") end
  2. Gabriele01

    SQL Error!

    I'm geting the datebase error like; Datebase query failed: no such column: (nickname) local addVehicle = executeSQLQuery("INSERT INTO carslot3 (PlayerName,Model,Cost,Paintjob,Color,Upgrade0,Upgrade1,Upgrade2,Upgrade3,Upgrade4,Upgrade5,Upgrade6,Upgrade7,Upgrade8,Upgrade9,Upgrade10,Upgrade11,Upgrade12,Upgrade13,Upgrade14,Upgrade15,Upgrade16) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", tostring(name), tonumber(id), tonumber(cost), tonumber(paintjob), tostring(color), " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ")
  3. Finished; local cars = { {429,75000,"• BMW F10"," 5-25"}, {410,15000,"• Honda CRX"," 6-11"}, {451,36000,"• Honda S2000"," 5-9"}, {526,"VIP","• Mustang GT"," 10-35"}, {496,7500,"• Fiat 126"," 2-7"}, {527,42500,"• Toyota Supra"," 10-14"}, {402,32000,"• BMW E30 Stock"," 8-10"}, {426,27000,"• BMW E32 Stock"," 6-10"}, {554,42000,"• Chevrolet Silverado 1500"," 3-9"}, {401,11000,"• VAZ 2108"," 4-10"}, {400,65000,"• Alfa Romeo Giulietta"," 7-15"}, {479,45000,"• BMW E34 Touring"," 8-13"}, } v1 = CarID v2 = price v3 = Name v4 = giveMoney when speed is bigger then 50
  4. function kazan1 () local moneyTable = { [429] = math.random(1,2), [436] = math.random(5,25) } local pVehicle = getPedOccupiedVehicle(source) local vehModel = getElementModel(pVehicle) local pMoney = moneyTable[vehModel] givePlayerMoney(source,pMoney) end addEvent( "para5", true ) addEventHandler( "para5", getRootElement(), kazan1 ) That's working, ty for all my lifeguard. <3
  5. Okay, thats working now, I use
  6. I don't know what is what, I'm so confused.
  7. function kazan1 () local moneyTable = { [429] = math.random(5,200), [436] = math.random(5,25) } local thePlayer = getVehicleOccupant(source) local pVehicle = getPedOccupiedVehicle(thePlayer) local vehModel = getElementModel(pVehicle) local pMoney = moneyTable[vehModel] givePlayerMoney(thePlayer,pMoney) end addEvent( "para5", true ) addEventHandler( "para5", root, kazan1 ) What is wrong?
  8. I already know NeXuS™, Why you speak? [2017-07-22 23:37:06] WARNING: [gameplay]/moneydata/cruiseserver.lua:82: Bad argument @ 'getPedOccupiedVehicle' [Expected ped at argument 1, got nil] [2017-07-22 23:37:06] WARNING: [gameplay]/moneydata/cruiseserver.lua:83: Bad argument @ 'getElementModel' [Expected element at argument 1, got boolean] [2017-07-22 23:37:06] WARNING: [gameplay]/moneydata/cruiseserver.lua:90: Bad argument @ 'givePlayerMoney' [Expected number at argument 2, got nil] I wrote to server.lua and geting that warning and I can't earn money from drive a car. @NeXuS™ You got wrong me, I need the car gives money, not price
  9. https://community.multitheftauto.com/index.php?p=resources&s=details&id=3940 You need that I think.
  10. I need to another code like for id, vehID in ipairs(moneyTable) do " xxxxxxxxx" end I need Xs at the here.
  11. local cars = { {579,60000},{400,60000}} for i,v in ipairs(cars) do local carName = getVehicleNameFromModel(v[1]) local row = guiGridListAddRow(carglVehicleSelection) guiGridListSetItemText(carglVehicleSelection,row,1,carName,false,true) guiGridListSetItemText(carglVehicleSelection,row,2,tostring(v[2]),false,true) end My server using that and I dont know how to use function buyCar1(button,state) if (source == buycar1) then guiSetVisible(carWindow,false) showCursor(false) local carName = guiGridListGetItemText(carglVehicleSelection,guiGridListGetSelectedItem(carglVehicleSelection),1) local carID = getVehicleModelFromName(carName) local carCost = guiGridListGetItemText(carglVehicleSelection,guiGridListGetSelectedItem(carglVehicleSelection),2) triggerServerEvent("buycar1",getLocalPlayer(),carID,carCost,CarName) elseif (source == buycar2) then guiSetVisible(carWindow,false) showCursor(false) local carName = guiGridListGetItemText(carglVehicleSelection,guiGridListGetSelectedItem(carglVehicleSelection),1) local carID = getVehicleModelFromName(carName) local carCost = guiGridListGetItemText(carglVehicleSelection,guiGridListGetSelectedItem(carglVehicleSelection),2) triggerServerEvent("buycar2",getLocalPlayer(),carID,carCost,CarName) elseif (source == buycar3) then guiSetVisible(carWindow,false) showCursor(false) local carName = guiGridListGetItemText(carglVehicleSelection,guiGridListGetSelectedItem(carglVehicleSelection),1) local carID = getVehicleModelFromName(carName) local carCost = guiGridListGetItemText(carglVehicleSelection,guiGridListGetSelectedItem(carglVehicleSelection),2) triggerServerEvent("buycar3",getLocalPlayer(),carID,carCost,CarName) elseif (source == buycar4) then guiSetVisible(carWindow,false) showCursor(false) local carName = guiGridListGetItemText(carglVehicleSelection,guiGridListGetSelectedItem(carglVehicleSelection),1) local carID = getVehicleModelFromName(carName) local carCost = guiGridListGetItemText(carglVehicleSelection,guiGridListGetSelectedItem(carglVehicleSelection),2) triggerServerEvent("buycar4",getLocalPlayer(),carID,carCost,CarName) elseif (source == buycar5) then guiSetVisible(carWindow,false) showCursor(false) local carName = guiGridListGetItemText(carglVehicleSelection,guiGridListGetSelectedItem(carglVehicleSelection),1) local carID = getVehicleModelFromName(carName) local carCost = guiGridListGetItemText(carglVehicleSelection,guiGridListGetSelectedItem(carglVehicleSelection),2) triggerServerEvent("buycar5",getLocalPlayer(),carID,carCost,CarName) elseif (source == closecarButton) then guiSetVisible(carWindow, false) showCursor(false) end end addEventHandler("onClientGUIClick",getRootElement(),buyCar1)