26.05.2009, 16:38
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:
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^^
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;
}
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^^