27.10.2012, 14:32
How to creat stats command?
My Register system - https://sampforum.blast.hk/showthread.php?tid=273088
My Register system - https://sampforum.blast.hk/showthread.php?tid=273088
Код:
if (strcmp("/stats", cmdtext, true, 5) == 0) { SendClientMessage(playerid, 0xFFFFFFFF, " |- - - - - - - - - - - - - - - - - - - |"); SendClientMessage(playerid, 0xFFFFFFFF, " - [Player name] these are your stats"); SendClientMessage(playerid, 0xFFFFFFFF, " - Cash: "); SendClientMessage(playerid, 0xFFFFFFFF, " - Kills:"); SendClientMessage(playerid, 0xFFFFFFFF, " - Deaths:"); SendClientMessage(playerid, 0xFFFFFFFF, " - Admin Level:"); SendClientMessage(playerid, 0xFFFFFFFF, " |- - - - - - - - - - - - - - - - - - - |"); return 1; }
Код:
new gPlayerLogged[MAX_PLAYERS]; new pRank[MAX_PLAYERS]; enum pInfo { pPass, pCash, pAdmin, pKills, pDeaths } new PlayerInfo[MAX_PLAYERS][pInfo]; forward LoadUser_data(playerid,name[],value[]); public LoadUser_data(playerid,name[],value[]) { INI_Int("Password",PlayerInfo[playerid][pPass]); INI_Int("Cash",PlayerInfo[playerid][pCash]); INI_Int("Admin",PlayerInfo[playerid][pAdmin]); INI_Int("Kills",PlayerInfo[playerid][pKills]); INI_Int("Deaths",PlayerInfo[playerid][pDeaths]); return 1; }