problème avec les munitions

  • Initiateur de la discussion PrincessGameuse
  • Date de début
  • Initiateur de la discussion
PrincessGameuse

PrincessGameuse

Geek
Messages
77
Score réaction
6
Points
45
j'ai des problèmes avec les munitions, en jeu les boites spawn mais ne donnent pas de munitions

Je met ça dans ammo.lua


Code:
DarkRP.createAmmoType("m9k_ammo_pistol", { name = "Munitions de pistolets", model = "models/Items/BoxSRounds.mdl", price = 120, amountGiven = 50, customCheck = function(ply) return table.HasValue({TEAM_GUN}, ply:Team()) end, CustomCheckFailMsg = "",
})
DarkRP.createAmmoType("m9k_ammo_357", { name = "Munitions de 357", model = "models/Items/357ammo.mdl", price = 120, amountGiven = 45, customCheck = function(ply) return table.HasValue({TEAM_GUN}, ply:Team()) end, CustomCheckFailMsg = "",
})
DarkRP.createAmmoType("m9k_ammo_buckshot", { name = "Munitions de Fusils à pompes", model = "models/Items/BoxBuckshot.mdl", price = 120, amountGiven = 45, customCheck = function(ply) return table.HasValue({TEAM_GUN}, ply:Team()) end, CustomCheckFailMsg = "",
})
DarkRP.createAmmoType("m9k_ammo_smg", { name = "Munitions de Mitrailles", model = "models/Items/BoxSRounds.mdl", price = 120, amountGiven = 60, customCheck = function(ply) return table.HasValue({TEAM_GUN}, ply:Team()) end, CustomCheckFailMsg = "",
})
DarkRP.createAmmoType("m9k_ammo_ar2", { name = "Munitions de Fusils d'Assaults", model = "models/Items/BoxMRounds.mdl", price = 120, amountGiven = 60, customCheck = function(ply) return table.HasValue({TEAM_GUN}, ply:Team()) end, CustomCheckFailMsg = "",
})
DarkRP.createAmmoType("m9k_ammo_winchester", { name = "Munitions de Carabines Winchester", model = "models/Items/sniper_round_box.mdl", price = 150, amountGiven = 100, customCheck = function(ply) return table.HasValue({TEAM_GUN}, ply:Team()) end, CustomCheckFailMsg = "",
})
DarkRP.createAmmoType("m9k_ammo_sniper_rounds", { name = "Munitions de Fusils Snipers", model = "models/items/sniper_round_box.mdl", price = 120, amountGiven = 45, customCheck = function(ply) return table.HasValue({TEAM_GUN}, ply:Team()) end, CustomCheckFailMsg = "",
})
 
lirrox

lirrox

Psychopathe
Messages
874
Score réaction
241
Points
250
PrincessGameuse à dit:
j'ai des problèmes avec les munitions, en jeu les boites spawn mais ne donnent pas de munitions

Je met ça dans ammo.lua


Code:
DarkRP.createAmmoType("m9k_ammo_pistol", { name = "Munitions de pistolets", model = "models/Items/BoxSRounds.mdl", price = 120, amountGiven = 50, customCheck = function(ply) return table.HasValue({TEAM_GUN}, ply:Team()) end, CustomCheckFailMsg = "",
})
DarkRP.createAmmoType("m9k_ammo_357", { name = "Munitions de 357", model = "models/Items/357ammo.mdl", price = 120, amountGiven = 45, customCheck = function(ply) return table.HasValue({TEAM_GUN}, ply:Team()) end, CustomCheckFailMsg = "",
})
DarkRP.createAmmoType("m9k_ammo_buckshot", { name = "Munitions de Fusils à pompes", model = "models/Items/BoxBuckshot.mdl", price = 120, amountGiven = 45, customCheck = function(ply) return table.HasValue({TEAM_GUN}, ply:Team()) end, CustomCheckFailMsg = "",
})
DarkRP.createAmmoType("m9k_ammo_smg", { name = "Munitions de Mitrailles", model = "models/Items/BoxSRounds.mdl", price = 120, amountGiven = 60, customCheck = function(ply) return table.HasValue({TEAM_GUN}, ply:Team()) end, CustomCheckFailMsg = "",
})
DarkRP.createAmmoType("m9k_ammo_ar2", { name = "Munitions de Fusils d'Assaults", model = "models/Items/BoxMRounds.mdl", price = 120, amountGiven = 60, customCheck = function(ply) return table.HasValue({TEAM_GUN}, ply:Team()) end, CustomCheckFailMsg = "",
})
DarkRP.createAmmoType("m9k_ammo_winchester", { name = "Munitions de Carabines Winchester", model = "models/Items/sniper_round_box.mdl", price = 150, amountGiven = 100, customCheck = function(ply) return table.HasValue({TEAM_GUN}, ply:Team()) end, CustomCheckFailMsg = "",
})
DarkRP.createAmmoType("m9k_ammo_sniper_rounds", { name = "Munitions de Fusils Snipers", model = "models/items/sniper_round_box.mdl", price = 120, amountGiven = 45, customCheck = function(ply) return table.HasValue({TEAM_GUN}, ply:Team()) end, CustomCheckFailMsg = "",
})
pourquoi mettre un customcheck?

Mets plutôt ça:

Code:
DarkRP.createAmmoType("m9k_ammo_pistol", { name = "Munitions de pistolets", model = "models/Items/BoxSRounds.mdl", price = 120, amountGiven = 50, allowed = TEAM_GUN
})
DarkRP.createAmmoType("m9k_ammo_357", { name = "Munitions de 357", model = "models/Items/357ammo.mdl", price = 120, amountGiven = 45, allowed = TEAM_GUN
})
DarkRP.createAmmoType("m9k_ammo_buckshot", { name = "Munitions de Fusils à pompes", model = "models/Items/BoxBuckshot.mdl", price = 120, amountGiven = 45, allowed = TEAM_GUN
})
DarkRP.createAmmoType("m9k_ammo_smg", { name = "Munitions de Mitrailles", model = "models/Items/BoxSRounds.mdl", price = 120, amountGiven = 60, allowed = TEAM_GUN
})
DarkRP.createAmmoType("m9k_ammo_ar2", { name = "Munitions de Fusils d'Assaults", model = "models/Items/BoxMRounds.mdl", price = 120, amountGiven = 60, allowed = TEAM_GUN
})
DarkRP.createAmmoType("m9k_ammo_winchester", { name = "Munitions de Carabines Winchester", model = "models/Items/sniper_round_box.mdl", price = 150, amountGiven = 100, allowed = TEAM_GUN
})
DarkRP.createAmmoType("m9k_ammo_sniper_rounds", { name = "Munitions de Fusils Snipers", model = "models/items/sniper_round_box.mdl", price = 120, amountGiven = 45, allowed = TEAM_GUN
})
 
  • Initiateur de la discussion
PrincessGameuse

PrincessGameuse

Geek
Messages
77
Score réaction
6
Points
45
lirrox à dit:
pourquoi mettre un customcheck?

Mets plutôt ça:

Code:
DarkRP.createAmmoType("m9k_ammo_pistol", { name = "Munitions de pistolets", model = "models/Items/BoxSRounds.mdl", price = 120, amountGiven = 50, allowed = TEAM_GUN
})
DarkRP.createAmmoType("m9k_ammo_357", { name = "Munitions de 357", model = "models/Items/357ammo.mdl", price = 120, amountGiven = 45, allowed = TEAM_GUN
})
DarkRP.createAmmoType("m9k_ammo_buckshot", { name = "Munitions de Fusils à pompes", model = "models/Items/BoxBuckshot.mdl", price = 120, amountGiven = 45, allowed = TEAM_GUN
})
DarkRP.createAmmoType("m9k_ammo_smg", { name = "Munitions de Mitrailles", model = "models/Items/BoxSRounds.mdl", price = 120, amountGiven = 60, allowed = TEAM_GUN
})
DarkRP.createAmmoType("m9k_ammo_ar2", { name = "Munitions de Fusils d'Assaults", model = "models/Items/BoxMRounds.mdl", price = 120, amountGiven = 60, allowed = TEAM_GUN
})
DarkRP.createAmmoType("m9k_ammo_winchester", { name = "Munitions de Carabines Winchester", model = "models/Items/sniper_round_box.mdl", price = 150, amountGiven = 100, allowed = TEAM_GUN
})
DarkRP.createAmmoType("m9k_ammo_sniper_rounds", { name = "Munitions de Fusils Snipers", model = "models/items/sniper_round_box.mdl", price = 120, amountGiven = 45, allowed = TEAM_GUN
})
Le problème ne vient pas de ça, j'ai déjà essayée
 
lirrox

lirrox

Psychopathe
Messages
874
Score réaction
241
Points
250
PrincessGameuse à dit:
Le problème ne vient pas de ça, j'ai déjà essayée
le custom check c'est pour les grades pas pour les team,
apres regarde sur le wiki gmod
 
  • Initiateur de la discussion
PrincessGameuse

PrincessGameuse

Geek
Messages
77
Score réaction
6
Points
45
ça fonctionne aussi pour les entités etc, tqt
 
lirrox

lirrox

Psychopathe
Messages
874
Score réaction
241
Points
250
PrincessGameuse à dit:
ça fonctionne aussi pour les entités etc, tqt
ben écoute fais comme tu veux
 
  • Initiateur de la discussion
PrincessGameuse

PrincessGameuse

Geek
Messages
77
Score réaction
6
Points
45
lirrox à dit:
ben écoute fais comme tu veux
Vas regarder dans le wiki, tu verras que ça ne change rien
 
lirrox

lirrox

Psychopathe
Messages
874
Score réaction
241
Points
250
PrincessGameuse à dit:
Vas regarder dans le wiki, tu verras que ça ne change rien
Je t'ai dis fais comme tu veux
 
  • Initiateur de la discussion
PrincessGameuse

PrincessGameuse

Geek
Messages
77
Score réaction
6
Points
45
Si on ne peut même pas demander de l'aide.. --'
 
Insomniaque97

Insomniaque97

Geek suprême
Messages
481
Score réaction
142
Points
150
Voici le mien avec les customs checks qui fonctionnent :


HTML:
DarkRP.createAmmoType("pistol", { name = "Munitions de Pistolet", model = "models/Items/BoxSRounds.mdl", price = 120, amountGiven = 50, customCheck = function(ply) return table.HasValue({TEAM_GUN, TEAM_GUNS, TEAM_CONTREBANDIER}, ply:Team()) end, CustomCheckFailMsg = "",
})
DarkRP.createAmmoType("357", { name = "Munitions de 357", model = "models/Items/357ammo.mdl", price = 120, amountGiven = 45, customCheck = function(ply) return table.HasValue({TEAM_GUN, TEAM_GUNS, TEAM_CONTREBANDIER}, ply:Team()) end, CustomCheckFailMsg = "",
})
DarkRP.createAmmoType("buckshot", { name = "Munitions de Fusil a Pompe", model = "models/Items/BoxBuckshot.mdl", price = 60, amountGiven = 24, customCheck = function(ply) return table.HasValue({TEAM_GUN, TEAM_GUNS, TEAM_CONTREBANDIER}, ply:Team()) end, CustomCheckFailMsg = "",
})
DarkRP.createAmmoType("smg1", { name = "Munitions de Mitraillette", model = "models/Items/BoxSRounds.mdl", price = 120, amountGiven = 60, customCheck = function(ply) return table.HasValue({TEAM_GUN, TEAM_GUNS, TEAM_CONTREBANDIER}, ply:Team()) end, CustomCheckFailMsg = "",
})
DarkRP.createAmmoType( "ar2", { name = "Munitions de Fusil d'Assault", model = "models/Items/BoxMRounds.mdl", price = 140, amountGiven = 60, customCheck = function(ply) return table.HasValue({TEAM_GUN, TEAM_GUNS, TEAM_CONTREBANDIER}, ply:Team()) end, CustomCheckFailMsg = "",
})
DarkRP.createAmmoType( "AirboatGun", { name = "Munitions de Winchester", model = "models/Items/sniper_round_box.mdl", price = 120, amountGiven = 45, customCheck = function(ply) return table.HasValue({TEAM_GUN, TEAM_GUNS, TEAM_CONTREBANDIER}, ply:Team()) end, CustomCheckFailMsg = "",
})
 
  • J'aime
Réactions: PrincessGameuse
  • Initiateur de la discussion
PrincessGameuse

PrincessGameuse

Geek
Messages
77
Score réaction
6
Points
45
Insomniaque97 à dit:
Voici le mien avec les customs checks qui fonctionnent :


HTML:
DarkRP.createAmmoType("pistol", { name = "Munitions de Pistolet", model = "models/Items/BoxSRounds.mdl", price = 120, amountGiven = 50, customCheck = function(ply) return table.HasValue({TEAM_GUN, TEAM_GUNS, TEAM_CONTREBANDIER}, ply:Team()) end, CustomCheckFailMsg = "",
})
DarkRP.createAmmoType("357", { name = "Munitions de 357", model = "models/Items/357ammo.mdl", price = 120, amountGiven = 45, customCheck = function(ply) return table.HasValue({TEAM_GUN, TEAM_GUNS, TEAM_CONTREBANDIER}, ply:Team()) end, CustomCheckFailMsg = "",
})
DarkRP.createAmmoType("buckshot", { name = "Munitions de Fusil a Pompe", model = "models/Items/BoxBuckshot.mdl", price = 60, amountGiven = 24, customCheck = function(ply) return table.HasValue({TEAM_GUN, TEAM_GUNS, TEAM_CONTREBANDIER}, ply:Team()) end, CustomCheckFailMsg = "",
})
DarkRP.createAmmoType("smg1", { name = "Munitions de Mitraillette", model = "models/Items/BoxSRounds.mdl", price = 120, amountGiven = 60, customCheck = function(ply) return table.HasValue({TEAM_GUN, TEAM_GUNS, TEAM_CONTREBANDIER}, ply:Team()) end, CustomCheckFailMsg = "",
})
DarkRP.createAmmoType( "ar2", { name = "Munitions de Fusil d'Assault", model = "models/Items/BoxMRounds.mdl", price = 140, amountGiven = 60, customCheck = function(ply) return table.HasValue({TEAM_GUN, TEAM_GUNS, TEAM_CONTREBANDIER}, ply:Team()) end, CustomCheckFailMsg = "",
})
DarkRP.createAmmoType( "AirboatGun", { name = "Munitions de Winchester", model = "models/Items/sniper_round_box.mdl", price = 120, amountGiven = 45, customCheck = function(ply) return table.HasValue({TEAM_GUN, TEAM_GUNS, TEAM_CONTREBANDIER}, ply:Team()) end, CustomCheckFailMsg = "",
})
Merciiii !!
 
Discord d'entraide
Rejoignz-nous sur Discord