Szerző Téma: Mi a hiba a scriptebben  (Megtekintve 1077 alkalommal)

Mi a hiba a scriptebben
« Dátum: 2018. július 08. - 22:07:11 »
0 Show voters
Sziasztok!Ma írtam egy saját jármű elmentése dolgot.
 
Csak az a baj, hogy nem működik. Aki tud segíteni az
 
javítja ki a scriptet
 
 
 
Script: Szerver Oldal:
 
addCommandHandler(\"myveh\", 
    function (thePlayer)
        local veh = getPedOccupiedVehicle(thePlayer)
        outputChatBox(\"#FFFF00[#0000FFMyVeh#FFFF00] #FFFFFFEz a jármű már a tied!\", thePlayer, 0, 0, 0, true)
    end
)

 
addEventHandler(\"onPlayerQuit\", root, 
    function (thePlayer, veh)
        local veh = getPedOccupiedVehicle(thePlayer)
        local pos = getElementPosition( veh )
        local rot = getElementRotation( veh )
        local color = getVehicleColor( veh )
        local paintjob = getVehiclePaintjob( veh )
        local model = getElementModel( veh )
        local acc = getPlayerAccount(thePlayer)
        setAccountData(acc, \"vmodel\", model)
        setAccountData(acc, \"vpos\", pos)
        setAccountData(acc, \"vrot\", rot)
        setAccountData(acc, \"vcolor\", color)
        setAccountData(acc, \"vpaintjob\", paintjob)
        destoyElement(veh)
    end
)

 
addEventHandler(\"onPlayerLogout\", root, 
    function (thePlayer, veh)
        local pos = getElementPosition( veh )
        local rot = getElementRotation( veh )
        local color = getVehicleColor( veh )
        local paintjob = getVehiclePaintjob( veh )
        local model = getElementModel( veh )
        local acc = getPlayerAccount(thePlayer)
        setAccountData(acc, \"vmodel\", model)
        setAccountData(acc, \"vpos\", pos)
        setAccountData(acc, \"vrot\", rot)
        setAccountData(acc, \"vcolor\", color)
        setAccountData(acc, \"vpaintjob\", paintjob)
        destoyElement(veh)
    end
)

 
addEventHandler(\"onPlayerLogin\", root, 
    function (thePlayer)
        acc = getPlayerAccount(thePlayer)
        local pos = getAccountData(acc, \"vpos\")
        local rot = getAccountData(acc, \"vrot\")
        local color = getAccountData(acc, \"vcolor\")
        local paintjob = getAccountData(acc, \"vpaintjob\")
        local model = getAccountData(acc, \"vmodel\")
        veh = createVehicle(477, 0, 0, 200)
        setElementPosition( veh )
        setElementRotation( veh )
        setVehicleColor( veh )
        setVehiclePaintjob( veh )
        setElementModel( veh )
    end
)

 
 

Nem elérhető Eduka

  • 214
    • Profil megtekintése
Mi a hiba a scriptebben
« Válasz #1 Dátum: 2018. július 10. - 16:16:26 »
0 Show voters
Wikin nézz utána, hogy mégis hogy használd az eventeket :D

Mi a hiba a scriptebben
« Válasz #2 Dátum: 2018. július 11. - 18:49:43 »
0 Show voters
Idézetet írta: Eduka date=1531232186


   
      Wikin nézz utána, hogy mégis hogy használd az eventeket :D
   


Itt vannak a logok:
 
[2018-07-08 21:19:11] LOGIN: (Jatekos, Admin, Tulaj) andrasxa successfully logged in as \'andrasxa\' (IP: 127.0.0.1  Serial: 9E3918AB5A9C08CD7A593BB11A1E5884)
[2018-07-08 21:19:21] WARNING: [rp]\\block-mcveh\\server.lua:27: Bad argument @ \'getElementPosition\' [Expected element at argument 1, got account]
[2018-07-08 21:19:21] WARNING: [rp]\\block-mcveh\\server.lua:28: Bad argument @ \'getElementRotation\' [Expected element at argument 1, got account]
[2018-07-08 21:19:21] WARNING: [rp]\\block-mcveh\\server.lua:29: Bad argument @ \'getVehicleColor\' [Expected vehicle at argument 1, got account]
[2018-07-08 21:19:21] WARNING: [rp]\\block-mcveh\\server.lua:30: Bad argument @ \'getVehiclePaintjob\' [Expected vehicle at argument 1, got account]
[2018-07-08 21:19:21] WARNING: [rp]\\block-mcveh\\server.lua:31: Bad argument @ \'getElementModel\' [Expected element at argument 1, got account]
[2018-07-08 21:19:21] WARNING: [rp]\\block-mcveh\\server.lua:32: Bad argument @ \'getPlayerAccount\' [Expected element at argument 1, got account]
[2018-07-08 21:19:21] WARNING: [rp]\\block-mcveh\\server.lua:33: Bad argument @ \'setAccountData\' [Expected account at argument 1, got boolean]
[2018-07-08 21:19:21] WARNING: [rp]\\block-mcveh\\server.lua:34: Bad argument @ \'setAccountData\' [Expected account at argument 1, got boolean]
[2018-07-08 21:19:21] WARNING: [rp]\\block-mcveh\\server.lua:35: Bad argument @ \'setAccountData\' [Expected account at argument 1, got boolean]
[2018-07-08 21:19:21] WARNING: [rp]\\block-mcveh\\server.lua:36: Bad argument @ \'setAccountData\' [Expected account at argument 1, got boolean]
[2018-07-08 21:19:21] WARNING: [rp]\\block-mcveh\\server.lua:37: Bad argument @ \'setAccountData\' [Expected account at argument 1, got boolean]
[2018-07-08 21:19:21] ERROR: [rp]\\block-mcveh\\server.lua:38: attempt to call global \'destoyElement\' (a nil value)
[2018-07-08 21:19:21] LOGOUT: andrasxa logged out as \'andrasxa\'
[2018-07-08 21:23:06] restart: Requested by Console
[2018-07-08 21:23:06] restart: Resource restarting...
[2018-07-08 21:23:06] Stopping Login
[2018-07-08 21:23:06] WARNING: [admin]\\block-god\\script.lua:51: Bad argument @ \'setVehicleDamageProof\' [Expected element at argument 1, got nil]
[2018-07-08 21:23:06] Starting Login
[2018-07-08 21:23:06] Login restarted successfully
[2018-07-08 21:23:21] ERROR: [rp]\\block-inv\\functions\\functions_s.lua:77: attempt to call global \'mysql_escape_string\' (a nil value)
[2018-07-08 21:23:21] ERROR: Bank\\server\\bank.script.server.lua:101: attempt to call a string value
[2018-07-08 21:23:21] WARNING: [rp]\\block-mcveh\\server.lua:45: Bad argument @ \'getPlayerAccount\' [Expected element at argument 1, got account]
[2018-07-08 21:23:21] WARNING: [rp]\\block-mcveh\\server.lua:46: Bad argument @ \'getAccountData\' [Expected account at argument 1, got boolean]
[2018-07-08 21:23:21] WARNING: [rp]\\block-mcveh\\server.lua:47: Bad argument @ \'getAccountData\' [Expected account at argument 1, got boolean]
[2018-07-08 21:23:21] WARNING: [rp]\\block-mcveh\\server.lua:48: Bad argument @ \'getAccountData\' [Expected account at argument 1, got boolean]
[2018-07-08 21:23:21] WARNING: [rp]\\block-mcveh\\server.lua:49: Bad argument @ \'getAccountData\' [Expected account at argument 1, got boolean]
[2018-07-08 21:23:21] WARNING: [rp]\\block-mcveh\\server.lua:50: Bad argument @ \'getAccountData\' [Expected account at argument 1, got boolean]
[2018-07-08 21:23:21] WARNING: [rp]\\block-mcveh\\server.lua:52: Bad argument @ \'setElementPosition\' [Expected vector3 at argument 2, got none]
[2018-07-08 21:23:21] WARNING: [rp]\\block-mcveh\\server.lua:53: Bad argument @ \'setElementRotation\' [Expected vector3 at argument 2, got none]
[2018-07-08 21:23:21] WARNING: [rp]\\block-mcveh\\server.lua:55: Bad argument @ \'setVehiclePaintjob\' [Expected number at argument 2, got none]
[2018-07-08 21:23:21] WARNING: [rp]\\block-mcveh\\server.lua:56: Bad argument @ \'setElementModel\' [Expected number at argument 2, got none]

Nem elérhető Eduka

  • 214
    • Profil megtekintése
Mi a hiba a scriptebben
« Válasz #3 Dátum: 2018. július 12. - 19:20:47 »
0 Show voters
Ezért mondtam, hogy nézz rá wikire h h használd, nem fogom helyetted kijavítani :DD
 
 
 
edit: jobban jársz ha újrakezded xd
« Utoljára szerkesztve: 2018. július 12. - 19:21:06 írta Eduka »

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal