id system
#4

YSI uses id system...You can look for an example....
In addition,I've ever made a project with id system,but has stopped the project for many reasons,only I think I can help you with my little experience.

ID system should be hooked by nickname,and should make independent functions to deal with userid.
eg:
pawn Код:
/**
command:
 /register [password]
 /login [userid] [password]
functions:
 public:
  onPlayerRegister(playerid)
  onPlayerLogin(playerid,userid)
  onPlayerLogout(userid)
  data_setUserCash(userid)
  user(playerid);
Variables:
  g_s_UserData[MAX_USERS][E_USER_DATA]
============*/

public OnPlayerSpawn(playerid){
 data_setUserCash(user(playerid));
 return true;
}
You'd better use cache to store user data,and save it to database when playerid is disconnect

In fact,many ideas was done in YSI,everyone will learn more skill if they decide to understand the code
In my opinion,it's the best project on PAWN language script.
Sorry for my english,and hope I can help you,even a little^^
Reply


Messages In This Thread
id system - by JoeDaDude - 26.05.2009, 10:29
Re: id system - by woot - 26.05.2009, 10:31
Re: id system - by JoeDaDude - 26.05.2009, 10:33
Re: id system - by yezizhu - 26.05.2009, 16:38

Forum Jump:


Users browsing this thread: 1 Guest(s)