[Tutorial] [TUT] How to add additional entries in ErroR's registration system
#1

Link to registration system: http://forum.sa-mp.com/index.php?topic=166203.0

This is very easy. Modes such as the Godfather can be edited easily with this feature.

If you do not have to "OnPlayerRegistered" callback, you must add one.

Making a Kills / Deaths saving:

Put in OnPlayerRegistered callback:
pawn Code:
AddIntInfo(username,"kills",0);
AddIntInfo(username,"deaths",0);
Put in OnPlayerDeath callback:
pawn Code:
new deaths, kills;
deaths = GetMemberStatsInt(GetPlayerUsername(playerid),"deaths");
kills = GetMemberStatsInt(GetPlayerUsername(killerid),"kills");
SetMemberStatsInt(GetPlayerUsername(playerid),"deaths",deaths+1);
SetMemberStatsInt(GetPlayerUsername(killerid),"kills",kills+1);
If you want to get kills/deaths:

pawn Code:
new kills,deaths;
kills = GetMemberStatsInt(GetPlayerUsername(playerid),"kills");
deaths = GetMemberStatsInt(GetPlayerUsername(playerid),"deaths");
Soon I will explain how to include my system to Godfather.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)