Problème avec le cardealer SlowNLS

  • Initiateur de la discussion Peter Pondic
  • Date de début
  • Initiateur de la discussion
Peter Pondic

Peter Pondic

Aeltuar
Messages
143
Score réaction
24
Points
130
Bonjour , j'ai un problème avec le car dealer de @slownls , effectivement lorsque je ne l'avais point configuré avec seulement les 2 véhicules des bases (Les 2 véhicules Half-Life) , j'ai ajouter tous mes véhicules dans le fichier config , et une erreur apparaît lorsque j'utilise l'arme pour faire spawn le concessionaire :

17/03/2019 19:36:22: Lua Error:[ERROR] addons/car_dealer/lua/weapons/car_dealer_weapon/shared.lua:64: attempt to index global 'CarDealer' (a nil value)1. unknown - addons/car_dealer/lua/weapons/car_dealer_weapon/shared.lua:64[ERROR] addons/car_dealer/lua/weapons/car_dealer_weapon/shared.lua:64: attempt to index global 'CarDealer' (a nil value)1. unknown - addons/car_dealer/lua/weapons/car_dealer_weapon/shared.lua:64

Voici l'intégralité du fichier config :
Code:
 CarDealer = {}
CarDealer.Config = {}
CarDealer.Vehicles = {}
CarDealer.Languages = {}
CarDealer.Config.Language = "fr"
CarDealer.Config.AdminGroups = { ['superadmin'] = true,
}
--[[------------------------------------------------------------------------- Vehicles
---------------------------------------------------------------------------]]
CarDealer.Vehicles[ "dk_rtwizy" ] = { Price = 1000, NPC = 1,
}
CarDealer.Vehicles[ "dodge_charger_70_fnf_lw" ] = { Price = 4000, NPC = 3,
}
CarDealer.Vehicles[ "dk_bwmi3" ] = { Price = 4000, NPC = 3,
}
CarDealer.Vehicles[ "crsk_subaru_wrx_sti_2015" ] = { Price = 4000, NPC = 3,
}
CarDealer.Vehicles[ "crsk_lambo_centenario" ] = { Price = 6000, NPC = 3,
}
CarDealer.Vehicles[ "sky_r8_ico" ] = { Price = 5500, NPC = 3,
}
CarDealer.Vehicles[ "sky_bugattichiron_ico" ] = { Price = 25000, NPC = 3,
}
CarDealer.Vehicles[ "sw_gokart" ] = { Price = 560, NPC = 3,
}
CarDealer.Vehicles[ "crsk_peugeot_206rc_2003" ] = { Price = 1200 NPC = 3,
}
CarDealer.Vehicles[ "sky_m5f90_ico" ] = { Price = 4000 NPC = 3,
}
CarDealer.Vehicles[ "sky_boxster_ico" ] = { Price = 8000 NPC = 3,
}
CarDealer.Vehicles[ "crsk_ferrari_812superfast_2017" ] = { Price = 8000 NPC = 3,
}
CarDealer.Vehicles[ "crsk_mercedes_gl63_amg_2013" ] = { Price = 3000 NPC = 3,
}
CarDealer.Vehicles[ "crsk_mercedes_e63amg_w212_face" ] = { Price = 1200 NPC = 3,
}
CarDealer.Vehicles[ "crsk_cadillac_cts-v_2016" ] = { Price = 1200 NPC = 3,
}
CarDealer.Vehicles[ "crsk_mercedes_e63amg_w212_face" ] = { Price = 4000 NPC = 3,
}
CarDealer.Vehicles[ "azok30_citroen_berlingo_2017" ] = { Price = 5800 NPC = 1,
}
CarDealer.Vehicles[ "azok30_peugeot_508_gt_2019" ] = { Price = 12000 NPC = 1,
}
CarDealer.Vehicles[ "azok30_renault_megane_4_sedan" ] = { Price = 12000 NPC = 1,
}
CarDealer.Vehicles[ "crsk_alfa_giulia_quadrifoglio_2017" ] = { Price = 22000 NPC = 1,
}
CarDealer.Vehicles[ "crsk_audi_rs6_avant_2016" ] = { Price = 22000 NPC = 1,
}
CarDealer.Vehicles[ "crsk_bmw_i8" ] = { Price = 16500 NPC = 1,
}
CarDealer.Vehicles[ "crsk_dodge_challenger_hellcat_2015" ] = { Price = 26000 NPC = 1,
}
CarDealer.Vehicles[ "crsk_ford_focus_mk3_2012" ] = { Price = 19800 NPC = 1,
}
CarDealer.Vehicles[ "crsk_ferrari_812superfast_2017" ] = { Price = 88000 NPC = 1,
}
CarDealer.Vehicles[ "crsk_lambo_centenario" ] = { Price = 90000 NPC = 1,
}
CarDealer.Vehicles[ "crsk_maserati_alfieri_concept" ] = { Price = 45000 NPC = 1,
}
CarDealer.Vehicles[ "crsk_mercedes_560sel" ] = { Price = 28000 NPC = 1,
}
CarDealer.Vehicles[ "crsk_mercedes_c63s_coupe_2016" ] = { Price = 22000 NPC = 1,
}
CarDealer.Vehicles[ "crsk_mercedes_g500_2008" ] = { Price = 16000 NPC = 1,
}
CarDealer.Vehicles[ "crsk_mercedes_gl63_amg_2013" ] = { Price = 16000 NPC = 1,
}
CarDealer.Vehicles[ "crsk_nissan_370z_2016" ] = { Price = 22000 NPC = 1,
}
CarDealer.Vehicles[ "crsk_peugeot_206rc_2003" ] = { Price = 8500 NPC = 1,
}
CarDealer.Vehicles[ "crsk_seat_leon_cupra_r_2003" ] = { Price = 8750 NPC = 1,
}
CarDealer.Vehicles[ "crsk_volvo_xc90_t8_2015" ] = { Price = 15000 NPC = 1,
}
CarDealer.Vehicles[ "crsk_mercedes_vito_panel_2014" ] = { Price = 9200 NPC = 1,
}
CarDealer.Vehicles[ "cad_eldorado" ] = { Price = 36200 NPC = 1,
}
CarDealer.Vehicles[ "r4_458s" ] = { Price = 95000 NPC = 1,
}
CarDealer.Vehicles[ "mercedes_a45" ] = { Price = 26800 NPC = 1,
}
CarDealer.Vehicles[ "rv" ] = { Price = 8600 NPC = 1,
}
CarDealer.Vehicles[ "crsk_paz_3205" ] = { Price = 8650 NPC = 1,
}
CarDealer.Vehicles[ "sw_gokart" ] = { Price = 1600 NPC = 1,
}
CarDealer.Vehicles[ "sky_mini03_ico" ] = { Price = 8700 NPC = 1,
}
CarDealer.Vehicles[ "volc30_ico" ] = { Price = 6350 NPC = 1,
}
CarDealer.Vehicles[ "sky_r8_ico" ] = { Price = 8650 NPC = 1,
}
CarDealer.Vehicles[ "sky_bugattichiron_ico" ] = { Price = 92000, NPC = 1,
}
CarDealer.Vehicles[ "sky_m5f90_ico" ] = { Price = 78560 NPC = 1,
}
CarDealer.Vehicles[ "sky_boxster_ico" ] = { Price = 88000 NPC = 1,
}
CarDealer.Vehicles[ "crsk_cadillac_cts-v_2016" ] = { Price = 72000 NPC = 1,
}
CarDealer.Vehicles[ "crsk_ford_focus_mk3_2012_police" ] = { Price = 1 NPC = 2,
}
CarDealer.Vehicles[ "Honda CBR Gendarmerie" ] = { Price = 1 NPC = 2,
}
CarDealer.Vehicles[ "volvo_s60_pol" ] = { Price = 1 NPC = 2,
}
CarDealer.Vehicles[ "Toyota Prius Gendarmerie" ] = { Price = 1 NPC = 2,
}
CarDealer.Vehicles[ "perryn_fiat_ducato" ] = { Price 1 NPC = 2,
}
CarDealer.Vehicles[ "police3gtav" ] = { Price 1 NPC = 2,
}
CarDealer.Vehicles[ "bustdm" ] = { Price 16300 NPC = 1,
}
--[[------------------------------------------------------------------------- Languages
---------------------------------------------------------------------------]]
CarDealer.Languages[ 'fr' ] = { [ "EnterNPCID" ] = "Entrer l'ID de votre npc...", [ "SetSpawn" ] = "Définir le spawn", [ "EnterNPCName" ] = "Entrer le nom du npc...", [ "Save" ] = "Sauvegarder", [ "Delete" ] = "Supprimer", [ "Store" ] = "Magasin", [ "Garage" ] = "Garage", [ "Buy" ] = "Acheter", [ "Sell" ] = "Vendre", [ "NoMoney" ] = "Vous n'avez pas assez d'argent.", [ "AlreadyVehicle" ] = "Vous avez déjà ce véhicule.", [ "PurchasedVehicle" ] = "Vous avez acheter ce véhicule.", [ "NPCNotExist" ] = "Le NPC n'existe pas.", [ "NoSpawnSet" ] = "Aucun spawn à été définie."
}
CarDealer.Languages[ 'en' ] = { [ "EnterNPCID" ] = "Enter the ID of your npc...", [ "SetSpawn" ] = "Set Spawn", [ "EnterNPCName" ] = "Enter NPC name...", [ "Save" ] = "Save", [ "Delete" ] = "Delete", [ "Store" ] = "Store", [ "Garage" ] = "Garage", [ "Buy" ] = "Buy", [ "Sell" ] = "Sell", [ "NoMoney" ] = "You do not have enough money.", [ "AlreadyVehicle" ] = "You already have this vehicle.", [ "PurchasedVehicle" ] = "You bought this vehicle.", [ "NPCNotExist" ] = "The npc does not exist.", [ "NoSpawnSet" ] = "No spawn set.",
}
J'espère que vous allez pouvoir m'aider :)
 
thepsyca

thepsyca

Psychopathe
Messages
2 164
Score réaction
648
Points
365
Il te manque énormément de virgule à beaucoup de fin de ligne "Price".
 
  • Initiateur de la discussion
Peter Pondic

Peter Pondic

Aeltuar
Messages
143
Score réaction
24
Points
130
thepsyca à dit:
Il te manque énormément de virgule à beaucoup de fin de ligne "Price".
merci
 
  • Initiateur de la discussion
Peter Pondic

Peter Pondic

Aeltuar
Messages
143
Score réaction
24
Points
130
thepsyca à dit:
Il te manque énormément de virgule à beaucoup de fin de ligne "Price".
Ah bah ça ne fonctionne pas :(
 
G-F-CD TheFrench

G-F-CD TheFrench

namespace Arthur;
Messages
451
Score réaction
38
Points
140
Comme la dit @thepsyca ou sont les virgules et il est leak ton addons ??
 
NoaGamingFR

NoaGamingFR

Wait :)
Messages
3 650
Score réaction
625
Points
340
G-F-CD TheFrench à dit:
Comme la dit @thepsyca ou sont les virgules et il est leak ton addons ??
....
SlownLS/car-dealer

Donc non, et @Peter Pondic renvoie ton fichier avec tes dernieres modifs.
 
  • Initiateur de la discussion
Peter Pondic

Peter Pondic

Aeltuar
Messages
143
Score réaction
24
Points
130
NoaGamingFR à dit:
....
SlownLS/car-dealer

Donc non, et @Peter Pondic renvoie ton fichier avec tes dernieres modifs.
Je t'envoie ça dans une petite heure ☺
 
  • Initiateur de la discussion
Peter Pondic

Peter Pondic

Aeltuar
Messages
143
Score réaction
24
Points
130
NoaGamingFR à dit:
....
SlownLS/car-dealer

Donc non, et @Peter Pondic renvoie ton fichier avec tes dernieres modifs.
Voilà ! :
Code:
 CarDealer = {}
CarDealer.Config = {}
CarDealer.Vehicles = {}
CarDealer.Languages = {}
CarDealer.Config.Language = "fr"
CarDealer.Config.AdminGroups = { ['superadmin'] = true,
}
--[[------------------------------------------------------------------------- Vehicles
---------------------------------------------------------------------------]]
CarDealer.Vehicles[ "dk_rtwizy" ] = { Price = 1000, NPC = 1,
}
CarDealer.Vehicles[ "dodge_charger_70_fnf_lw" ] = { Price = 4000, NPC = 3,
}
CarDealer.Vehicles[ "dk_bwmi3" ] = { Price = 4000, NPC = 3,
}
CarDealer.Vehicles[ "crsk_subaru_wrx_sti_2015" ] = { Price = 4000, NPC = 3,
}
CarDealer.Vehicles[ "crsk_lambo_centenario" ] = { Price = 6000, NPC = 3,
}
CarDealer.Vehicles[ "sky_r8_ico" ] = { Price = 5500, NPC = 3,
}
CarDealer.Vehicles[ "sky_bugattichiron_ico" ] = { Price = 25000, NPC = 3,
}
CarDealer.Vehicles[ "sw_gokart" ] = { Price = 560, NPC = 3,
}
CarDealer.Vehicles[ "crsk_peugeot_206rc_2003" ] = { Price = 1200, NPC = 3,
}
CarDealer.Vehicles[ "sky_m5f90_ico" ] = { Price = 4000, NPC = 3,
}
CarDealer.Vehicles[ "sky_boxster_ico" ] = { Price = 8000, NPC = 3,
}
CarDealer.Vehicles[ "crsk_ferrari_812superfast_2017" ] = { Price = 8000, NPC = 3,
}
CarDealer.Vehicles[ "crsk_mercedes_gl63_amg_2013" ] = { Price = 3000, NPC = 3,
}
CarDealer.Vehicles[ "crsk_mercedes_e63amg_w212_face" ] = { Price = 1200, NPC = 3,
}
CarDealer.Vehicles[ "crsk_cadillac_cts-v_2016" ] = { Price = 1200, NPC = 3,
}
CarDealer.Vehicles[ "crsk_mercedes_e63amg_w212_face" ] = { Price = 4000, NPC = 3,
}
CarDealer.Vehicles[ "azok30_citroen_berlingo_2017" ] = { Price = 5800, NPC = 1,
}
CarDealer.Vehicles[ "azok30_peugeot_508_gt_2019" ] = { Price = 12000, NPC = 1,
}
CarDealer.Vehicles[ "azok30_renault_megane_4_sedan" ] = { Price = 12000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_alfa_giulia_quadrifoglio_2017" ] = { Price = 22000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_audi_rs6_avant_2016" ] = { Price = 22000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_bmw_i8" ] = { Price = 16500, NPC = 1,
}
CarDealer.Vehicles[ "crsk_dodge_challenger_hellcat_2015" ] = { Price = 26000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_ford_focus_mk3_2012" ] = { Price = 19800, NPC = 1,
}
CarDealer.Vehicles[ "crsk_ferrari_812superfast_2017" ] = { Price = 88000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_lambo_centenario" ] = { Price = 90000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_maserati_alfieri_concept" ] = { Price = 45000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_mercedes_560sel" ] = { Price = 28000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_mercedes_c63s_coupe_2016" ] = { Price = 22000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_mercedes_g500_2008" ] = { Price = 16000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_mercedes_gl63_amg_2013" ] = { Price = 16000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_nissan_370z_2016" ] = { Price = 22000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_peugeot_206rc_2003" ] = { Price = 8500, NPC = 1,
}
CarDealer.Vehicles[ "crsk_seat_leon_cupra_r_2003" ] = { Price = 8750, NPC = 1,
}
CarDealer.Vehicles[ "crsk_volvo_xc90_t8_2015" ] = { Price = 15000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_mercedes_vito_panel_2014" ] = { Price = 9200, NPC = 1,
}
CarDealer.Vehicles[ "cad_eldorado" ] = { Price = 36200, NPC = 1,
}
CarDealer.Vehicles[ "r4_458s" ] = { Price = 95000, NPC = 1,
}
CarDealer.Vehicles[ "mercedes_a45" ] = { Price = 26800, NPC = 1,
}
CarDealer.Vehicles[ "rv" ] = { Price = 8600, NPC = 1,
}
CarDealer.Vehicles[ "crsk_paz_3205" ] = { Price = 8650, NPC = 1,
}
CarDealer.Vehicles[ "sw_gokart" ] = { Price = 1600, NPC = 1,
}
CarDealer.Vehicles[ "sky_mini03_ico" ] = { Price = 8700, NPC = 1,
}
CarDealer.Vehicles[ "volc30_ico" ] = { Price = 6350, NPC = 1,
}
CarDealer.Vehicles[ "sky_r8_ico" ] = { Price = 8650, NPC = 1,
}
CarDealer.Vehicles[ "sky_bugattichiron_ico" ] = { Price = 92000, NPC = 1,
}
CarDealer.Vehicles[ "sky_m5f90_ico" ] = { Price = 78560, NPC = 1,
}
CarDealer.Vehicles[ "sky_boxster_ico" ] = { Price = 88000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_cadillac_cts-v_2016" ] = { Price = 72000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_ford_focus_mk3_2012_police" ] = { Price = 1, NPC = 2,
}
CarDealer.Vehicles[ "Honda CBR Gendarmerie" ] = { Price = 1, NPC = 2,
}
CarDealer.Vehicles[ "volvo_s60_pol" ] = { Price = 1, NPC = 2,
}
CarDealer.Vehicles[ "Toyota Prius Gendarmerie" ] = { Price = 1, NPC = 2,
}
CarDealer.Vehicles[ "perryn_fiat_ducato" ] = { Price 1, NPC = 2,
}
CarDealer.Vehicles[ "police3gtav" ] = { Price 1, NPC = 2,
}
CarDealer.Vehicles[ "bustdm" ] = { Price 16300, NPC = 1,
}
--[[------------------------------------------------------------------------- Languages
---------------------------------------------------------------------------]]
CarDealer.Languages[ 'fr' ] = { [ "EnterNPCID" ] = "Entrer l'ID de votre npc...", [ "SetSpawn" ] = "Définir le spawn", [ "EnterNPCName" ] = "Entrer le nom du npc...", [ "Save" ] = "Sauvegarder", [ "Delete" ] = "Supprimer", [ "Store" ] = "Magasin", [ "Garage" ] = "Garage", [ "Buy" ] = "Acheter", [ "Sell" ] = "Vendre", [ "NoMoney" ] = "Vous n'avez pas assez d'argent.", [ "AlreadyVehicle" ] = "Vous avez déjà ce véhicule.", [ "PurchasedVehicle" ] = "Vous avez acheter ce véhicule.", [ "NPCNotExist" ] = "Le NPC n'existe pas.", [ "NoSpawnSet" ] = "Aucun spawn à été définie."
}
CarDealer.Languages[ 'en' ] = { [ "EnterNPCID" ] = "Enter the ID of your npc...", [ "SetSpawn" ] = "Set Spawn", [ "EnterNPCName" ] = "Enter NPC name...", [ "Save" ] = "Save", [ "Delete" ] = "Delete", [ "Store" ] = "Store", [ "Garage" ] = "Garage", [ "Buy" ] = "Buy", [ "Sell" ] = "Sell", [ "NoMoney" ] = "You do not have enough money.", [ "AlreadyVehicle" ] = "You already have this vehicle.", [ "PurchasedVehicle" ] = "You bought this vehicle.", [ "NPCNotExist" ] = "The npc does not exist.", [ "NoSpawnSet" ] = "No spawn set.",
}
 
thepsyca

thepsyca

Psychopathe
Messages
2 164
Score réaction
648
Points
365
Peter Pondic à dit:
Voilà ! :
Code:
 CarDealer = {}
CarDealer.Config = {}
CarDealer.Vehicles = {}
CarDealer.Languages = {}
CarDealer.Config.Language = "fr"
CarDealer.Config.AdminGroups = { ['superadmin'] = true,
}
--[[------------------------------------------------------------------------- Vehicles
---------------------------------------------------------------------------]]
CarDealer.Vehicles[ "dk_rtwizy" ] = { Price = 1000, NPC = 1,
}
CarDealer.Vehicles[ "dodge_charger_70_fnf_lw" ] = { Price = 4000, NPC = 3,
}
CarDealer.Vehicles[ "dk_bwmi3" ] = { Price = 4000, NPC = 3,
}
CarDealer.Vehicles[ "crsk_subaru_wrx_sti_2015" ] = { Price = 4000, NPC = 3,
}
CarDealer.Vehicles[ "crsk_lambo_centenario" ] = { Price = 6000, NPC = 3,
}
CarDealer.Vehicles[ "sky_r8_ico" ] = { Price = 5500, NPC = 3,
}
CarDealer.Vehicles[ "sky_bugattichiron_ico" ] = { Price = 25000, NPC = 3,
}
CarDealer.Vehicles[ "sw_gokart" ] = { Price = 560, NPC = 3,
}
CarDealer.Vehicles[ "crsk_peugeot_206rc_2003" ] = { Price = 1200, NPC = 3,
}
CarDealer.Vehicles[ "sky_m5f90_ico" ] = { Price = 4000, NPC = 3,
}
CarDealer.Vehicles[ "sky_boxster_ico" ] = { Price = 8000, NPC = 3,
}
CarDealer.Vehicles[ "crsk_ferrari_812superfast_2017" ] = { Price = 8000, NPC = 3,
}
CarDealer.Vehicles[ "crsk_mercedes_gl63_amg_2013" ] = { Price = 3000, NPC = 3,
}
CarDealer.Vehicles[ "crsk_mercedes_e63amg_w212_face" ] = { Price = 1200, NPC = 3,
}
CarDealer.Vehicles[ "crsk_cadillac_cts-v_2016" ] = { Price = 1200, NPC = 3,
}
CarDealer.Vehicles[ "crsk_mercedes_e63amg_w212_face" ] = { Price = 4000, NPC = 3,
}
CarDealer.Vehicles[ "azok30_citroen_berlingo_2017" ] = { Price = 5800, NPC = 1,
}
CarDealer.Vehicles[ "azok30_peugeot_508_gt_2019" ] = { Price = 12000, NPC = 1,
}
CarDealer.Vehicles[ "azok30_renault_megane_4_sedan" ] = { Price = 12000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_alfa_giulia_quadrifoglio_2017" ] = { Price = 22000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_audi_rs6_avant_2016" ] = { Price = 22000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_bmw_i8" ] = { Price = 16500, NPC = 1,
}
CarDealer.Vehicles[ "crsk_dodge_challenger_hellcat_2015" ] = { Price = 26000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_ford_focus_mk3_2012" ] = { Price = 19800, NPC = 1,
}
CarDealer.Vehicles[ "crsk_ferrari_812superfast_2017" ] = { Price = 88000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_lambo_centenario" ] = { Price = 90000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_maserati_alfieri_concept" ] = { Price = 45000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_mercedes_560sel" ] = { Price = 28000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_mercedes_c63s_coupe_2016" ] = { Price = 22000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_mercedes_g500_2008" ] = { Price = 16000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_mercedes_gl63_amg_2013" ] = { Price = 16000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_nissan_370z_2016" ] = { Price = 22000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_peugeot_206rc_2003" ] = { Price = 8500, NPC = 1,
}
CarDealer.Vehicles[ "crsk_seat_leon_cupra_r_2003" ] = { Price = 8750, NPC = 1,
}
CarDealer.Vehicles[ "crsk_volvo_xc90_t8_2015" ] = { Price = 15000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_mercedes_vito_panel_2014" ] = { Price = 9200, NPC = 1,
}
CarDealer.Vehicles[ "cad_eldorado" ] = { Price = 36200, NPC = 1,
}
CarDealer.Vehicles[ "r4_458s" ] = { Price = 95000, NPC = 1,
}
CarDealer.Vehicles[ "mercedes_a45" ] = { Price = 26800, NPC = 1,
}
CarDealer.Vehicles[ "rv" ] = { Price = 8600, NPC = 1,
}
CarDealer.Vehicles[ "crsk_paz_3205" ] = { Price = 8650, NPC = 1,
}
CarDealer.Vehicles[ "sw_gokart" ] = { Price = 1600, NPC = 1,
}
CarDealer.Vehicles[ "sky_mini03_ico" ] = { Price = 8700, NPC = 1,
}
CarDealer.Vehicles[ "volc30_ico" ] = { Price = 6350, NPC = 1,
}
CarDealer.Vehicles[ "sky_r8_ico" ] = { Price = 8650, NPC = 1,
}
CarDealer.Vehicles[ "sky_bugattichiron_ico" ] = { Price = 92000, NPC = 1,
}
CarDealer.Vehicles[ "sky_m5f90_ico" ] = { Price = 78560, NPC = 1,
}
CarDealer.Vehicles[ "sky_boxster_ico" ] = { Price = 88000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_cadillac_cts-v_2016" ] = { Price = 72000, NPC = 1,
}
CarDealer.Vehicles[ "crsk_ford_focus_mk3_2012_police" ] = { Price = 1, NPC = 2,
}
CarDealer.Vehicles[ "Honda CBR Gendarmerie" ] = { Price = 1, NPC = 2,
}
CarDealer.Vehicles[ "volvo_s60_pol" ] = { Price = 1, NPC = 2,
}
CarDealer.Vehicles[ "Toyota Prius Gendarmerie" ] = { Price = 1, NPC = 2,
}
CarDealer.Vehicles[ "perryn_fiat_ducato" ] = { Price 1, NPC = 2,
}
CarDealer.Vehicles[ "police3gtav" ] = { Price 1, NPC = 2,
}
CarDealer.Vehicles[ "bustdm" ] = { Price 16300, NPC = 1,
}
--[[------------------------------------------------------------------------- Languages
---------------------------------------------------------------------------]]
CarDealer.Languages[ 'fr' ] = { [ "EnterNPCID" ] = "Entrer l'ID de votre npc...", [ "SetSpawn" ] = "Définir le spawn", [ "EnterNPCName" ] = "Entrer le nom du npc...", [ "Save" ] = "Sauvegarder", [ "Delete" ] = "Supprimer", [ "Store" ] = "Magasin", [ "Garage" ] = "Garage", [ "Buy" ] = "Acheter", [ "Sell" ] = "Vendre", [ "NoMoney" ] = "Vous n'avez pas assez d'argent.", [ "AlreadyVehicle" ] = "Vous avez déjà ce véhicule.", [ "PurchasedVehicle" ] = "Vous avez acheter ce véhicule.", [ "NPCNotExist" ] = "Le NPC n'existe pas.", [ "NoSpawnSet" ] = "Aucun spawn à été définie."
}
CarDealer.Languages[ 'en' ] = { [ "EnterNPCID" ] = "Enter the ID of your npc...", [ "SetSpawn" ] = "Set Spawn", [ "EnterNPCName" ] = "Enter NPC name...", [ "Save" ] = "Save", [ "Delete" ] = "Delete", [ "Store" ] = "Store", [ "Garage" ] = "Garage", [ "Buy" ] = "Buy", [ "Sell" ] = "Sell", [ "NoMoney" ] = "You do not have enough money.", [ "AlreadyVehicle" ] = "You already have this vehicle.", [ "PurchasedVehicle" ] = "You bought this vehicle.", [ "NPCNotExist" ] = "The npc does not exist.", [ "NoSpawnSet" ] = "No spawn set.",
}
L293 && L298 && L303 il manque un =
 
  • Initiateur de la discussion
Peter Pondic

Peter Pondic

Aeltuar
Messages
143
Score réaction
24
Points
130
NoaGamingFR

NoaGamingFR

Wait :)
Messages
3 650
Score réaction
625
Points
340
  • Initiateur de la discussion
Peter Pondic

Peter Pondic

Aeltuar
Messages
143
Score réaction
24
Points
130
NoaGamingFR à dit:
Des nouvelles ?
Alors sur mon 2 ème car dealer à l'air d'être bugué mais ça doit venir de moi et mon car dealer police fonctionne (Je pense que le deuxième ne fonctionne pas car j'ai mis 2 fois les mêmes véhicules dans 2 concess différents)
 
  • Initiateur de la discussion
Peter Pondic

Peter Pondic

Aeltuar
Messages
143
Score réaction
24
Points
130
NoaGamingFR à dit:
Des nouvelles ?
Je viens de voir un nouveau problème en faite rien à voir avec les 2 car dealers , juste quand je vais dans l'onglet "Garage" , les véhicules n'apparaissent pas tous (ceux que j'ai acheté) et une erreur Lua apparaît :
[ERROR] addons/car_dealer/lua/autorun/client/cl_car_dealer.lua:112: attempt to index a nil value
1. CarDealerGarage - addons/car_dealer/lua/autorun/client/cl_car_dealer.lua:112
2. DoClick - addons/car_dealer/lua/autorun/client/cl_car_dealer.lua:211
3. unknown - lua/vgui/dlabel.lua:234

:(
Voici le fichier concerné en entier :
Code:
 --[[------------------------------------------------------------------------- Blur
---------------------------------------------------------------------------]]
local blur = Material("pp/blurscreen")
local function DrawBlur( p, a, d ) local x, y = p:LocalToScreen( 0, 0 ) surface.SetDrawColor( 255, 255, 255 ) surface.SetMaterial( blur ) for i = 1, d do blur:SetFloat( "$blur", (i / d ) * ( a ) ) blur:Recompute() render.UpdateScreenEffectTexture() surface.DrawTexturedRect( x * -1, y * -1, ScrW(), ScrH() ) end
end
--[[------------------------------------------------------------------------- Car Dealer Menus
---------------------------------------------------------------------------]]
local function CarDealerStore( NPCID ) local List = vgui.Create( "DScrollPanel", CarDealer.Fond ) List:SetSize( CarDealer.Fond:GetWide(), CarDealer.Fond:GetTall() ) List:SetPos( 0, 0 ) local scrollbar = List:GetVBar() function scrollbar:Paint(w, h) draw.RoundedBox( 3, 6, 0, 8, h, Color( 30, 30, 30, 200 ) ) end function scrollbar.btnUp:Paint(w, h) draw.RoundedBox( 3, 6, 0, 8, h, Color( 30, 30, 30, 200 )) end function scrollbar.btnDown:Paint(w, h) draw.RoundedBox( 3, 6, 0, 8, h, Color( 30, 30, 30, 200 ) ) end function scrollbar.btnGrip:Paint(w, h) draw.RoundedBox( 3, 6, 0, 8, h, Color( 236, 100, 75, 200 ) ) end for k, v in pairs( CarDealer.Vehicles ) do if NPCID != v.NPC then continue end if CarDealerVehTable[ k ] then continue end local CarInfos = {} CarInfos = list.Get("Vehicles")[ k ] local Fond = vgui.Create( "DPanel", List ) Fond:SetSize( 0, 65 ) Fond:DockMargin( 0, 0, 0, 5 ) Fond:Dock( TOP ) Fond.Paint = function(self, w,h) draw.RoundedBox( 0, 0, 0, w, h, Color( 236, 100, 75, 200 ) ) -- Car infos draw.SimpleText( CarInfos.Name, "Trebuchet24", 75, 8, color_white ) draw.SimpleText( DarkRP.formatMoney( v.Price ), "Trebuchet24", 75, 33, color_white ) end local Model = vgui.Create( "SpawnIcon", Fond ) Model:SetSize( 64, 65 ) Model:SetPos( 0, 0 ) Model:SetModel( CarInfos.Model ) Model:SetTooltip() local BuyVehicle = vgui.Create( "DButton", Fond ) BuyVehicle:SetText( CarDealer.Languages[ CarDealer.Config.Language ][ 'Buy' ] ) BuyVehicle:SetTextColor( Color( 255, 255, 255, 255 ) ) BuyVehicle:SetPos( List:GetWide() - 120, 18 ) BuyVehicle:SetSize( 100, 30 ) BuyVehicle.Paint = function( self, w, h) draw.RoundedBox( 0, 0, 0, w, h, Color( 30, 30, 30, 200 ) ) end BuyVehicle.DoClick = function() net.Start( "CarDealer:Player:Buy" ) net.WriteString( k ) net.SendToServer() CarDealer.Fond:GetParent():Remove() end end
end
local function CarDealerGarage( NPCID ) local List = vgui.Create( "DScrollPanel", CarDealer.Fond ) List:SetSize( CarDealer.Fond:GetWide(), CarDealer.Fond:GetTall() ) List:SetPos( 0, 0 ) local scrollbar = List:GetVBar() function scrollbar:Paint(w, h) draw.RoundedBox( 3, 6, 0, 8, h, Color( 30, 30, 30, 200 ) ) end function scrollbar.btnUp:Paint(w, h) draw.RoundedBox( 3, 6, 0, 8, h, Color( 30, 30, 30, 200 )) end function scrollbar.btnDown:Paint(w, h) draw.RoundedBox( 3, 6, 0, 8, h, Color( 30, 30, 30, 200 ) ) end function scrollbar.btnGrip:Paint(w, h) draw.RoundedBox( 3, 6, 0, 8, h, Color( 236, 100, 75, 200 ) ) end for k, v in pairs( CarDealerVehTable ) do if NPCID != CarDealer.Vehicles[ k ][ 'NPC' ] then continue end local CarInfos = {} CarInfos = list.Get("Vehicles")[ k ] local Fond = vgui.Create( "DPanel", List ) Fond:SetSize( 0, 65 ) Fond:DockMargin( 0, 0, 0, 5 ) Fond:Dock( TOP ) Fond.Paint = function(self, w,h) draw.RoundedBox( 0, 0, 0, w, h, Color( 236, 100, 75, 200 ) ) -- Car infos draw.SimpleText( CarInfos.Name, "Trebuchet24", 75, 21, color_white ) end local Model = vgui.Create( "SpawnIcon", Fond ) Model:SetSize( 64, 65 ) Model:SetPos( 0, 0 ) Model:SetModel( CarInfos.Model ) Model:SetTooltip() local SpawnVehicle = vgui.Create("DButton", Fond) SpawnVehicle:SetText( "Spawn" ) SpawnVehicle:SetTextColor( Color( 255, 255, 255, 255 ) ) SpawnVehicle:SetPos( List:GetWide() - 120, 5 ) SpawnVehicle:SetSize( 100, 25 ) SpawnVehicle.Paint = function( self, w, h) draw.RoundedBox( 0, 0, 0, w, h, Color( 30, 30, 30, 200 ) ) end SpawnVehicle.DoClick = function() net.Start( "CarDealer:Player:Spawn" ) net.WriteString( k ) net.SendToServer() CarDealer.Fond:GetParent():Remove() end local SellVehicle = vgui.Create("DButton", Fond) SellVehicle:SetText( CarDealer.Languages[ CarDealer.Config.Language ][ 'Sell' ].. " ( " .. DarkRP.formatMoney( CarDealerVehTable[ k ][ 'Price' ] / 2 ) .. " )" ) SellVehicle:SetTextColor( Color( 255, 255, 255, 255 ) ) SellVehicle:SetPos( List:GetWide() - 120, 35 ) SellVehicle:SetSize( 100, 25 ) SellVehicle.Paint = function( self, w, h) draw.RoundedBox( 0, 0, 0, w, h, Color( 30, 30, 30, 200 ) ) end SellVehicle.DoClick = function() net.Start( "CarDealer:Player:Sell" ) net.WriteString( k ) net.SendToServer() CarDealer.Fond:GetParent():Remove() end end
end
net.Receive( "CarDealer:Player:OpenMenu", function() local NPCID = net.ReadInt( 32 ) local Base = vgui.Create( "DFrame" ) Base:SetSize( 500, 400 ) Base:Center() Base:SetTitle( "" ) Base:SetDraggable( false ) Base:MakePopup() Base.Paint = function( self, w, h ) DrawBlur( self, 6, 30 ) draw.RoundedBox( 6, 0, 0, w, h, Color( 30, 30, 30, 200 ) ) draw.RoundedBox( 1, 0, 0, w, 25, Color( 236, 100, 75, 200 ) ) draw.RoundedBox( 1, 0, 25, w, 1, Color( 0, 0, 0, 80 ) ) end -- Fond CarDealer.Fond = vgui.Create( "DPanel", Base ) CarDealer.Fond:SetSize( Base:GetWide() - 10, Base:GetTall() - 70 ) CarDealer.Fond:SetPos( 5, 65 ) CarDealer.Fond.Paint = function() end -- Store btn local Store = vgui.Create( "CarDealerBtn", Base ) Store:SetPos( 5, 30 ) Store:SetSize( 100, 30 ) Store:SetButtonText( CarDealer.Languages[ CarDealer.Config.Language ][ 'Store' ] ) Store.DoClick = function() CarDealer.Fond:Clear() CarDealerStore( NPCID ) end -- Garage btn local Garage = vgui.Create( "CarDealerBtn", Base ) Garage:SetPos( 110, 30 ) Garage:SetSize( 100, 30 ) Garage:SetButtonText( CarDealer.Languages[ CarDealer.Config.Language ][ 'Garage' ] ) Garage.DoClick = function() CarDealer.Fond:Clear() CarDealerGarage( NPCID ) end CarDealerStore( NPCID )
end)
net.Receive( "CarDealer:NPC:CreateMenu", function() local Ent = net.ReadEntity() local Base = vgui.Create( "DFrame" ) Base:SetSize( 500, 190 ) Base:Center() Base:SetTitle( "" ) Base:SetDraggable( false ) Base:MakePopup() Base.Paint = function( self, w, h ) DrawBlur( self, 6, 30 ) draw.RoundedBox( 6, 0, 0, w, h, Color( 30, 30, 30, 200 ) ) draw.RoundedBox( 1, 0, 0, w, 25, Color( 236, 100, 75, 200 ) ) draw.RoundedBox( 1, 0, 25, w, 1, Color( 0, 0, 0, 80 ) ) end local Nm = vgui.Create( "DTextEntry", Base ) Nm:SetSize( Base:GetWide() - 10, 25 ) Nm:SetPos( 5, 30 ) if Ent:GetCarDealerSave() == false then Nm:SetText( "Car Dealer" ) else Nm:SetText( Ent:GetCarDealerName() ) end Nm.OnGetFocus = function( self ) if self:GetText() == "Car Dealer" then self:SetText( "" ) end end Nm.OnLoseFocus = function( self ) if self:GetText() == "" then self:SetText( "Car Dealer" ) end end local Model = vgui.Create( "DTextEntry", Base ) Model:SetSize( Base:GetWide() - 10, 25 ) Model:SetPos( 5, 60 ) if Ent:GetCarDealerSave() == false then Model:SetText( "models/gman_high.mdl" ) else Model:SetText( Ent:GetCarDealerModel() ) end Model.OnGetFocus = function( self ) if self:GetText() == "models/gman_high.mdl" then self:SetText( "" ) end end Model.OnLoseFocus = function( self ) if self:GetText() == "" then self:SetText( "models/gman_high.mdl" ) end end local ID = vgui.Create( "DTextEntry", Base ) ID:SetSize( Base:GetWide() - 10, 25 ) ID:SetPos( 5, 90 ) if Ent:GetCarDealerSave() == false then ID:SetText( CarDealer.Languages[ CarDealer.Config.Language ][ 'EnterNPCID' ] ) else ID:SetText( Ent:GetCarDealerID() ) end ID.OnGetFocus = function( self ) if self:GetText() == CarDealer.Languages[ CarDealer.Config.Language ][ 'EnterNPCID' ] then self:SetText( "" ) end end ID.OnLoseFocus = function( self ) if self:GetText() == "" then self:SetText( CarDealer.Languages[ CarDealer.Config.Language ][ 'EnterNPCID' ] ) end end local Save = vgui.Create( "CarDealerBtn", Base ) Save:SetButtonText( CarDealer.Languages[ CarDealer.Config.Language ][ 'Save' ] ) Save:SetSize( Base:GetWide() - 10, 30 ) Save:SetPos( 5, Base:GetTall() - 70 ) Save.DoClick = function() if ID:GetValue() == CarDealer.Languages[ CarDealer.Config.Language ][ 'EnterNPCID' ] then return end net.Start( "CarDealer:NPC:Create" ) net.WriteEntity( Ent ) net.WriteString( Nm:GetValue() ) net.WriteString( Model:GetValue() ) net.WriteInt( ID:GetValue(), 32 ) net.SendToServer() Base:Remove() end local Delete = vgui.Create( "CarDealerBtn", Base ) Delete:SetButtonText( CarDealer.Languages[ CarDealer.Config.Language ][ 'Delete' ] ) Delete:SetSize( Base:GetWide() - 10, 30 ) Delete:SetPos( 5, Base:GetTall() - 35 ) Delete.DoClick = function() net.Start( "CarDealer:NPC:Delete" ) net.WriteEntity( Ent ) net.SendToServer() Base:Remove() end
end)
net.Receive( "CarDealer:NPC:SetSpawnMenu", function() local Base = vgui.Create( "DFrame" ) Base:SetSize( 500, 95 ) Base:Center() Base:SetTitle( "" ) Base:SetDraggable( false ) Base:MakePopup() Base.Paint = function( self, w, h ) DrawBlur( self, 6, 30 ) draw.RoundedBox( 6, 0, 0, w, h, Color( 30, 30, 30, 200 ) ) draw.RoundedBox( 1, 0, 0, w, 25, Color( 236, 100, 75, 200 ) ) draw.RoundedBox( 1, 0, 25, w, 1, Color( 0, 0, 0, 80 ) ) end local Nm = vgui.Create( "DTextEntry", Base ) Nm:SetSize( Base:GetWide() - 10, 25 ) Nm:SetPos( 5, 30 ) Nm:SetText( CarDealer.Languages[ CarDealer.Config.Language ][ 'EnterNPCName' ] ) Nm.OnGetFocus = function( self ) if self:GetText() == CarDealer.Languages[ CarDealer.Config.Language ][ 'EnterNPCName' ] then self:SetText( "" ) end end Nm.OnLoseFocus = function( self ) if self:GetText() == "" then self:SetText( CarDealer.Languages[ CarDealer.Config.Language ][ 'EnterNPCName' ] ) end end local SetSpawn = vgui.Create( "CarDealerBtn", Base ) SetSpawn:SetButtonText( CarDealer.Languages[ CarDealer.Config.Language ][ 'SetSpawn' ] ) SetSpawn:SetSize( Base:GetWide() - 10, 30 ) SetSpawn:SetPos( 5, Base:GetTall() - 35 ) SetSpawn.DoClick = function() if Nm:GetValue() == CarDealer.Languages[ CarDealer.Config.Language ][ 'EnterNPCName' ] then return end net.Start( "CarDealer:NPC:SetSpawn" ) net.WriteString( Nm:GetValue() ) net.SendToServer() Base:Remove() end
end)
--[[------------------------------------------------------------------------- Server To Client Network
---------------------------------------------------------------------------]]
net.Receive( "CarDealer:Player:SendToClient", function() local Vehicles = net.ReadTable() if not CarDealerVehTable then CarDealerVehTable = {} end if Vehicles then CarDealerVehTable = Vehicles end
end)
 
  • Initiateur de la discussion
Peter Pondic

Peter Pondic

Aeltuar
Messages
143
Score réaction
24
Points
130
Peter Pondic à dit:
Je viens de voir un nouveau problème en faite rien à voir avec les 2 car dealers , juste quand je vais dans l'onglet "Garage" , les véhicules n'apparaissent pas tous (ceux que j'ai acheté) et une erreur Lua apparaît :
[ERROR] addons/car_dealer/lua/autorun/client/cl_car_dealer.lua:112: attempt to index a nil value
1. CarDealerGarage - addons/car_dealer/lua/autorun/client/cl_car_dealer.lua:112
2. DoClick - addons/car_dealer/lua/autorun/client/cl_car_dealer.lua:211
3. unknown - lua/vgui/dlabel.lua:234

:(
Voici le fichier concerné en entier :
Code:
 --[[------------------------------------------------------------------------- Blur
---------------------------------------------------------------------------]]
local blur = Material("pp/blurscreen")
local function DrawBlur( p, a, d ) local x, y = p:LocalToScreen( 0, 0 ) surface.SetDrawColor( 255, 255, 255 ) surface.SetMaterial( blur ) for i = 1, d do blur:SetFloat( "$blur", (i / d ) * ( a ) ) blur:Recompute() render.UpdateScreenEffectTexture() surface.DrawTexturedRect( x * -1, y * -1, ScrW(), ScrH() ) end
end
--[[------------------------------------------------------------------------- Car Dealer Menus
---------------------------------------------------------------------------]]
local function CarDealerStore( NPCID ) local List = vgui.Create( "DScrollPanel", CarDealer.Fond ) List:SetSize( CarDealer.Fond:GetWide(), CarDealer.Fond:GetTall() ) List:SetPos( 0, 0 ) local scrollbar = List:GetVBar() function scrollbar:Paint(w, h) draw.RoundedBox( 3, 6, 0, 8, h, Color( 30, 30, 30, 200 ) ) end function scrollbar.btnUp:Paint(w, h) draw.RoundedBox( 3, 6, 0, 8, h, Color( 30, 30, 30, 200 )) end function scrollbar.btnDown:Paint(w, h) draw.RoundedBox( 3, 6, 0, 8, h, Color( 30, 30, 30, 200 ) ) end function scrollbar.btnGrip:Paint(w, h) draw.RoundedBox( 3, 6, 0, 8, h, Color( 236, 100, 75, 200 ) ) end for k, v in pairs( CarDealer.Vehicles ) do if NPCID != v.NPC then continue end if CarDealerVehTable[ k ] then continue end local CarInfos = {} CarInfos = list.Get("Vehicles")[ k ] local Fond = vgui.Create( "DPanel", List ) Fond:SetSize( 0, 65 ) Fond:DockMargin( 0, 0, 0, 5 ) Fond:Dock( TOP ) Fond.Paint = function(self, w,h) draw.RoundedBox( 0, 0, 0, w, h, Color( 236, 100, 75, 200 ) ) -- Car infos draw.SimpleText( CarInfos.Name, "Trebuchet24", 75, 8, color_white ) draw.SimpleText( DarkRP.formatMoney( v.Price ), "Trebuchet24", 75, 33, color_white ) end local Model = vgui.Create( "SpawnIcon", Fond ) Model:SetSize( 64, 65 ) Model:SetPos( 0, 0 ) Model:SetModel( CarInfos.Model ) Model:SetTooltip() local BuyVehicle = vgui.Create( "DButton", Fond ) BuyVehicle:SetText( CarDealer.Languages[ CarDealer.Config.Language ][ 'Buy' ] ) BuyVehicle:SetTextColor( Color( 255, 255, 255, 255 ) ) BuyVehicle:SetPos( List:GetWide() - 120, 18 ) BuyVehicle:SetSize( 100, 30 ) BuyVehicle.Paint = function( self, w, h) draw.RoundedBox( 0, 0, 0, w, h, Color( 30, 30, 30, 200 ) ) end BuyVehicle.DoClick = function() net.Start( "CarDealer:Player:Buy" ) net.WriteString( k ) net.SendToServer() CarDealer.Fond:GetParent():Remove() end end
end
local function CarDealerGarage( NPCID ) local List = vgui.Create( "DScrollPanel", CarDealer.Fond ) List:SetSize( CarDealer.Fond:GetWide(), CarDealer.Fond:GetTall() ) List:SetPos( 0, 0 ) local scrollbar = List:GetVBar() function scrollbar:Paint(w, h) draw.RoundedBox( 3, 6, 0, 8, h, Color( 30, 30, 30, 200 ) ) end function scrollbar.btnUp:Paint(w, h) draw.RoundedBox( 3, 6, 0, 8, h, Color( 30, 30, 30, 200 )) end function scrollbar.btnDown:Paint(w, h) draw.RoundedBox( 3, 6, 0, 8, h, Color( 30, 30, 30, 200 ) ) end function scrollbar.btnGrip:Paint(w, h) draw.RoundedBox( 3, 6, 0, 8, h, Color( 236, 100, 75, 200 ) ) end for k, v in pairs( CarDealerVehTable ) do if NPCID != CarDealer.Vehicles[ k ][ 'NPC' ] then continue end local CarInfos = {} CarInfos = list.Get("Vehicles")[ k ] local Fond = vgui.Create( "DPanel", List ) Fond:SetSize( 0, 65 ) Fond:DockMargin( 0, 0, 0, 5 ) Fond:Dock( TOP ) Fond.Paint = function(self, w,h) draw.RoundedBox( 0, 0, 0, w, h, Color( 236, 100, 75, 200 ) ) -- Car infos draw.SimpleText( CarInfos.Name, "Trebuchet24", 75, 21, color_white ) end local Model = vgui.Create( "SpawnIcon", Fond ) Model:SetSize( 64, 65 ) Model:SetPos( 0, 0 ) Model:SetModel( CarInfos.Model ) Model:SetTooltip() local SpawnVehicle = vgui.Create("DButton", Fond) SpawnVehicle:SetText( "Spawn" ) SpawnVehicle:SetTextColor( Color( 255, 255, 255, 255 ) ) SpawnVehicle:SetPos( List:GetWide() - 120, 5 ) SpawnVehicle:SetSize( 100, 25 ) SpawnVehicle.Paint = function( self, w, h) draw.RoundedBox( 0, 0, 0, w, h, Color( 30, 30, 30, 200 ) ) end SpawnVehicle.DoClick = function() net.Start( "CarDealer:Player:Spawn" ) net.WriteString( k ) net.SendToServer() CarDealer.Fond:GetParent():Remove() end local SellVehicle = vgui.Create("DButton", Fond) SellVehicle:SetText( CarDealer.Languages[ CarDealer.Config.Language ][ 'Sell' ].. " ( " .. DarkRP.formatMoney( CarDealerVehTable[ k ][ 'Price' ] / 2 ) .. " )" ) SellVehicle:SetTextColor( Color( 255, 255, 255, 255 ) ) SellVehicle:SetPos( List:GetWide() - 120, 35 ) SellVehicle:SetSize( 100, 25 ) SellVehicle.Paint = function( self, w, h) draw.RoundedBox( 0, 0, 0, w, h, Color( 30, 30, 30, 200 ) ) end SellVehicle.DoClick = function() net.Start( "CarDealer:Player:Sell" ) net.WriteString( k ) net.SendToServer() CarDealer.Fond:GetParent():Remove() end end
end
net.Receive( "CarDealer:Player:OpenMenu", function() local NPCID = net.ReadInt( 32 ) local Base = vgui.Create( "DFrame" ) Base:SetSize( 500, 400 ) Base:Center() Base:SetTitle( "" ) Base:SetDraggable( false ) Base:MakePopup() Base.Paint = function( self, w, h ) DrawBlur( self, 6, 30 ) draw.RoundedBox( 6, 0, 0, w, h, Color( 30, 30, 30, 200 ) ) draw.RoundedBox( 1, 0, 0, w, 25, Color( 236, 100, 75, 200 ) ) draw.RoundedBox( 1, 0, 25, w, 1, Color( 0, 0, 0, 80 ) ) end -- Fond CarDealer.Fond = vgui.Create( "DPanel", Base ) CarDealer.Fond:SetSize( Base:GetWide() - 10, Base:GetTall() - 70 ) CarDealer.Fond:SetPos( 5, 65 ) CarDealer.Fond.Paint = function() end -- Store btn local Store = vgui.Create( "CarDealerBtn", Base ) Store:SetPos( 5, 30 ) Store:SetSize( 100, 30 ) Store:SetButtonText( CarDealer.Languages[ CarDealer.Config.Language ][ 'Store' ] ) Store.DoClick = function() CarDealer.Fond:Clear() CarDealerStore( NPCID ) end -- Garage btn local Garage = vgui.Create( "CarDealerBtn", Base ) Garage:SetPos( 110, 30 ) Garage:SetSize( 100, 30 ) Garage:SetButtonText( CarDealer.Languages[ CarDealer.Config.Language ][ 'Garage' ] ) Garage.DoClick = function() CarDealer.Fond:Clear() CarDealerGarage( NPCID ) end CarDealerStore( NPCID )
end)
net.Receive( "CarDealer:NPC:CreateMenu", function() local Ent = net.ReadEntity() local Base = vgui.Create( "DFrame" ) Base:SetSize( 500, 190 ) Base:Center() Base:SetTitle( "" ) Base:SetDraggable( false ) Base:MakePopup() Base.Paint = function( self, w, h ) DrawBlur( self, 6, 30 ) draw.RoundedBox( 6, 0, 0, w, h, Color( 30, 30, 30, 200 ) ) draw.RoundedBox( 1, 0, 0, w, 25, Color( 236, 100, 75, 200 ) ) draw.RoundedBox( 1, 0, 25, w, 1, Color( 0, 0, 0, 80 ) ) end local Nm = vgui.Create( "DTextEntry", Base ) Nm:SetSize( Base:GetWide() - 10, 25 ) Nm:SetPos( 5, 30 ) if Ent:GetCarDealerSave() == false then Nm:SetText( "Car Dealer" ) else Nm:SetText( Ent:GetCarDealerName() ) end Nm.OnGetFocus = function( self ) if self:GetText() == "Car Dealer" then self:SetText( "" ) end end Nm.OnLoseFocus = function( self ) if self:GetText() == "" then self:SetText( "Car Dealer" ) end end local Model = vgui.Create( "DTextEntry", Base ) Model:SetSize( Base:GetWide() - 10, 25 ) Model:SetPos( 5, 60 ) if Ent:GetCarDealerSave() == false then Model:SetText( "models/gman_high.mdl" ) else Model:SetText( Ent:GetCarDealerModel() ) end Model.OnGetFocus = function( self ) if self:GetText() == "models/gman_high.mdl" then self:SetText( "" ) end end Model.OnLoseFocus = function( self ) if self:GetText() == "" then self:SetText( "models/gman_high.mdl" ) end end local ID = vgui.Create( "DTextEntry", Base ) ID:SetSize( Base:GetWide() - 10, 25 ) ID:SetPos( 5, 90 ) if Ent:GetCarDealerSave() == false then ID:SetText( CarDealer.Languages[ CarDealer.Config.Language ][ 'EnterNPCID' ] ) else ID:SetText( Ent:GetCarDealerID() ) end ID.OnGetFocus = function( self ) if self:GetText() == CarDealer.Languages[ CarDealer.Config.Language ][ 'EnterNPCID' ] then self:SetText( "" ) end end ID.OnLoseFocus = function( self ) if self:GetText() == "" then self:SetText( CarDealer.Languages[ CarDealer.Config.Language ][ 'EnterNPCID' ] ) end end local Save = vgui.Create( "CarDealerBtn", Base ) Save:SetButtonText( CarDealer.Languages[ CarDealer.Config.Language ][ 'Save' ] ) Save:SetSize( Base:GetWide() - 10, 30 ) Save:SetPos( 5, Base:GetTall() - 70 ) Save.DoClick = function() if ID:GetValue() == CarDealer.Languages[ CarDealer.Config.Language ][ 'EnterNPCID' ] then return end net.Start( "CarDealer:NPC:Create" ) net.WriteEntity( Ent ) net.WriteString( Nm:GetValue() ) net.WriteString( Model:GetValue() ) net.WriteInt( ID:GetValue(), 32 ) net.SendToServer() Base:Remove() end local Delete = vgui.Create( "CarDealerBtn", Base ) Delete:SetButtonText( CarDealer.Languages[ CarDealer.Config.Language ][ 'Delete' ] ) Delete:SetSize( Base:GetWide() - 10, 30 ) Delete:SetPos( 5, Base:GetTall() - 35 ) Delete.DoClick = function() net.Start( "CarDealer:NPC:Delete" ) net.WriteEntity( Ent ) net.SendToServer() Base:Remove() end
end)
net.Receive( "CarDealer:NPC:SetSpawnMenu", function() local Base = vgui.Create( "DFrame" ) Base:SetSize( 500, 95 ) Base:Center() Base:SetTitle( "" ) Base:SetDraggable( false ) Base:MakePopup() Base.Paint = function( self, w, h ) DrawBlur( self, 6, 30 ) draw.RoundedBox( 6, 0, 0, w, h, Color( 30, 30, 30, 200 ) ) draw.RoundedBox( 1, 0, 0, w, 25, Color( 236, 100, 75, 200 ) ) draw.RoundedBox( 1, 0, 25, w, 1, Color( 0, 0, 0, 80 ) ) end local Nm = vgui.Create( "DTextEntry", Base ) Nm:SetSize( Base:GetWide() - 10, 25 ) Nm:SetPos( 5, 30 ) Nm:SetText( CarDealer.Languages[ CarDealer.Config.Language ][ 'EnterNPCName' ] ) Nm.OnGetFocus = function( self ) if self:GetText() == CarDealer.Languages[ CarDealer.Config.Language ][ 'EnterNPCName' ] then self:SetText( "" ) end end Nm.OnLoseFocus = function( self ) if self:GetText() == "" then self:SetText( CarDealer.Languages[ CarDealer.Config.Language ][ 'EnterNPCName' ] ) end end local SetSpawn = vgui.Create( "CarDealerBtn", Base ) SetSpawn:SetButtonText( CarDealer.Languages[ CarDealer.Config.Language ][ 'SetSpawn' ] ) SetSpawn:SetSize( Base:GetWide() - 10, 30 ) SetSpawn:SetPos( 5, Base:GetTall() - 35 ) SetSpawn.DoClick = function() if Nm:GetValue() == CarDealer.Languages[ CarDealer.Config.Language ][ 'EnterNPCName' ] then return end net.Start( "CarDealer:NPC:SetSpawn" ) net.WriteString( Nm:GetValue() ) net.SendToServer() Base:Remove() end
end)
--[[------------------------------------------------------------------------- Server To Client Network
---------------------------------------------------------------------------]]
net.Receive( "CarDealer:Player:SendToClient", function() local Vehicles = net.ReadTable() if not CarDealerVehTable then CarDealerVehTable = {} end if Vehicles then CarDealerVehTable = Vehicles end
end)
Du coup, personne ne sait ? Car ça devient urgent car on voudrait ouvrir le serveur le plus vite possible mais sans car dealer, ça va être compliqué
 
NoaGamingFR

NoaGamingFR

Wait :)
Messages
3 650
Score réaction
625
Points
340
Peter Pondic à dit:
Du coup, personne ne sait ? Car ça devient urgent car on voudrait ouvrir le serveur le plus vite possible mais sans car dealer, ça va être compliqué
Uh oh, sorry j'avais pas vu (ou rep) je regarde ce soir si j'y pense.
 
  • Initiateur de la discussion
Peter Pondic

Peter Pondic

Aeltuar
Messages
143
Score réaction
24
Points
130
NoaGamingFR à dit:
Uh oh, sorry j'avais pas vu (ou rep) je regarde ce soir si j'y pense.
D'accord, merci à toi :)I
 
Wasied

Wasied

Psychopathe
Messages
911
Score réaction
398
Points
210
L'addon fonctionne, donc simplement tu le re-télécharges, tu configures tout CORRECTEMENT, SANS TOUCHER AUX VIRGULES, et l'addon devrait marcher..
Ca ne sert à rien de regarder dans les fichiers de l'addon, je ne pense pas que Slown aurait publié un addon non-fonctionnel.
 
  • J'aime
Réactions: NoaGamingFR
  • Initiateur de la discussion
Peter Pondic

Peter Pondic

Aeltuar
Messages
143
Score réaction
24
Points
130
Wasied à dit:
L'addon fonctionne, donc simplement tu le re-télécharges, tu configures tout CORRECTEMENT, SANS TOUCHER AUX VIRGULES, et l'addon devrait marcher..
Ca ne sert à rien de regarder dans les fichiers de l'addon, je ne pense pas que Slown aurait publié un addon non-fonctionnel.
D'accord je vais voir ça !
 
  • Initiateur de la discussion
Peter Pondic

Peter Pondic

Aeltuar
Messages
143
Score réaction
24
Points
130
Wasied à dit:
L'addon fonctionne, donc simplement tu le re-télécharges, tu configures tout CORRECTEMENT, SANS TOUCHER AUX VIRGULES, et l'addon devrait marcher..
Ca ne sert à rien de regarder dans les fichiers de l'addon, je ne pense pas que Slown aurait publié un addon non-fonctionnel.
Bon bah j'ai tout réinstaller , mais rien à faire , ça me fait la même erreur . Help me !
 
Discord d'entraide
Rejoignz-nous sur Discord