Hi everyone, i am learning lua and want to make achievment with this module: [url]http://www.garrysmod.org/downloads/?a=view&id=65862[/url]
That when i kill 100 zombies, i get "zombie slayer" achievment, it will be very grateful if someone write the code.
Thank you.
[highlight](User was banned for this post ("Wrong section" - mahalis))[/highlight]
Good luck.
[highlight](User was banned for this post ("This isn't helpful" - mahalis))[/highlight]
[code]local ACH = {}
ACH.Type = ACHIEVEMENT_PROGRESS
ACH.Description = "Kill 100 Zombies"
ACH.Image = "gui/silkicons/bomb"
ACH.Target = 100
function ACH:OnKilledNPC( ply, npc )
if npc:Classify() == CLASS_ZOMBIE then
self:AwardPoint( ply )
end
end
achievements.Register( "AI Killing", "Zombie Slayer", ACH )[/code]
Untested.
[QUOTE=Minion Jake;25714640][code]local ACH = {}
ACH.Type = ACHIEVEMENT_PROGRESS
ACH.Description = "Kill 100 Zombies"
ACH.Image = "gui/silkicons/bomb"
ACH.Target = 100
function ACH:OnKilledNPC( ply, npc )
if npc:Classify() == CLASS_ZOMBIE then
self:AwardPoint( ply )
end
end
achievements.Register( "AI Killing", "Zombie Slayer", ACH )[/code]
Untested.[/QUOTE]
Works great, thank you!
Sorry, you need to Log In to post a reply to this thread.