Help:Trying to build a RPG Lvling System


This is my first post here. I am trying to build my own Gmod RPG. I know there are things out there that already do things similar to what I want, but I would perfer to build this my self. I have lots of experience in coding, but little to none in LUA.

ATM what I am looking for is. If a player kills another player, how it tells that the Attacking Player killed the Victim Player.

I need this for my XP system, so then when The player kills, an NPC or another player, I can tell the system how much xp to give to what user for killing said person.

Something like

if <player1> {kills} <player2> then
setxp(<player_xp> + xp)

How do I define {KILLS}

I am doing that right now :smiley:
in the end, if i didn’t have my programming background, then i wouldn’t get it done :stuck_out_tongue:
i would suggest looking at the gamemode tutorials :3 that is what i did and it is comming allong nicely :smiley:
I have added you to steam friends, give me a call and il help you along :3

EDIT: just saw, does the steamcommunity button links to the correct profile? the only person i’m finding doesn’t even have garrys mod :stuck_out_tongue:

I have multiple accounts, my main account doesn’t have Gary’s mod.

PS: If any one can still answer my question That would be great. I am still trying to find out how to locate when one player kills another. Maybe You could direct me towards the correct tutorials that would help me with this.

Well to make a leveling system when one player kills another you should use this:

To check if a player killed someone else, for the XP you can use this:
that is like the most basic XP system.

Thanks for the help, I think i figured out what i was looking for :).

You might want to read my posts in this thread in case you find something of interest there :