id system
#1

Ok my rp dosent have a phonebook,
So im creating one, Ive done it all except for one thing,
The ID, I understand playerid but i dont know how to make it so its like,
/number [ID] and it gets that id and tells me there number, i got the number bit,
But i want it to look through the servers players and get the id, If it dosent exist,
Then it returns to me as, Player is not Connected, but if it is, it gives me there number,
Does anyone have a code for the id bit. Ty
Reply
#2

Since I guess you're using Godfather, download the original godfather, it does include the /number command.
Reply
#3

Im not using, godfather, moderntopia or any other rp for that matter,
Its my own custom made, Thats why ive had all these threads about stuff rp already has which i dont
Reply
#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


Forum Jump:


Users browsing this thread: 2 Guest(s)