- Initiateur de la discussion
F
flora807
Nouveau né
- Messages
- 6
- Score réaction
- 1
- Points
- 15
Bonjour
j'ai l'addon gquest mais quand je met le pnj sur mon serveur j'arrive a mettre les pierres ça me valide la quête mais le soucis c'est que j'ai aucune récompense je dois avoir un soucis avec le code :/
je vous le met
"
local QUEST = {};
QUEST.ID = 3;
QUEST.NPC = 1;
QUEST.Name = "Trouver 1 Pierre";
QUEST.Description = "";
QUEST.Objective = "Trouver 1 Pierre";
QUEST.OnCompleteDescription = "";
QUEST.Rewards = "$7,500";
QUEST.LevelRequirement = 5;
QUEST.ObjectiveRequirement = 1;
QUEST.ObjectiveClass = "ent_leafstone";
QUEST.OneTimeQuest = false;
QUEST.down = 3600;
QUEST.Enabled = true;
---
--- OnAccept
---
function QUEST:OnAccept(ply)
return true;
end
---
--- OnCompleted
---
function QUEST:OnCompleted(ply)
return true;
end
---
--- OnObjectiveUpdated
---
function QUEST:OnObjectiveUpdated(ply)
return true;
end
---
--- OnObjectiveSpawned
---
function QUEST:OnObjectiveSpawned(obj)
return true;
end
---
--- OnDelivered
---
function QUEST:OnDelivered()
return true;
end
---
--- OnQuestDisbanded
---
function QUEST:OnQuestDisbanded(ply)
return true;
end
---
--- RewardFunction
---
function QUEST:RewardFunction(ply)
return true;
end
---
--- OnQuestInitialized
---
function QUEST:OnQuestInitialized()
hook.Add("PlayerUse", "gQuest.DefaultQuest_3", function(ply, ent)
if (IsValid(ply) and IsValid(ent)) then
if (type(self.ObjectiveClass) == "table" and table.HasValue(self.ObjectiveClass, ent:GetClass()) or type(self.ObjectiveClass) == "string" and self.ObjectiveClass == ent:GetClass()) then
if (ply:GQ_HasAcceptedQuest(self.ID)) then
ply:GQ_AddQuestProgress(self.ID, 1);
ent:Remove();
end
end
end
end);
return true;
end
gQuest.RegisterQuest(QUEST);"
merci de votre aide ^^
j'ai l'addon gquest mais quand je met le pnj sur mon serveur j'arrive a mettre les pierres ça me valide la quête mais le soucis c'est que j'ai aucune récompense je dois avoir un soucis avec le code :/
je vous le met
"
local QUEST = {};
QUEST.ID = 3;
QUEST.NPC = 1;
QUEST.Name = "Trouver 1 Pierre";
QUEST.Description = "";
QUEST.Objective = "Trouver 1 Pierre";
QUEST.OnCompleteDescription = "";
QUEST.Rewards = "$7,500";
QUEST.LevelRequirement = 5;
QUEST.ObjectiveRequirement = 1;
QUEST.ObjectiveClass = "ent_leafstone";
QUEST.OneTimeQuest = false;
QUEST.down = 3600;
QUEST.Enabled = true;
---
--- OnAccept
---
function QUEST:OnAccept(ply)
return true;
end
---
--- OnCompleted
---
function QUEST:OnCompleted(ply)
return true;
end
---
--- OnObjectiveUpdated
---
function QUEST:OnObjectiveUpdated(ply)
return true;
end
---
--- OnObjectiveSpawned
---
function QUEST:OnObjectiveSpawned(obj)
return true;
end
---
--- OnDelivered
---
function QUEST:OnDelivered()
return true;
end
---
--- OnQuestDisbanded
---
function QUEST:OnQuestDisbanded(ply)
return true;
end
---
--- RewardFunction
---
function QUEST:RewardFunction(ply)
return true;
end
---
--- OnQuestInitialized
---
function QUEST:OnQuestInitialized()
hook.Add("PlayerUse", "gQuest.DefaultQuest_3", function(ply, ent)
if (IsValid(ply) and IsValid(ent)) then
if (type(self.ObjectiveClass) == "table" and table.HasValue(self.ObjectiveClass, ent:GetClass()) or type(self.ObjectiveClass) == "string" and self.ObjectiveClass == ent:GetClass()) then
if (ply:GQ_HasAcceptedQuest(self.ID)) then
ply:GQ_AddQuestProgress(self.ID, 1);
ent:Remove();
end
end
end
end);
return true;
end
gQuest.RegisterQuest(QUEST);"
merci de votre aide ^^