09.12.2010, 09:28
Yes I see what You mean, Im trying to Store Data without Login or Register. So What do I Do? Use OnPlayerUpdate? It saves the Data. that Might have helped lol
--scratch that, I want to save the Data on command lol
The General Idea is that when You do a Certain command, That Your Set to a Team using an Enum inside an Array, and On that Command it saves it so when you connect to the server after it has been restarted, youre In that team? You understand what I Mean.
So Far I Have
As the Data Storage. And I Have Dini
As The Enum.
So When It reconnects the Data is Restored.
The Command to make the Team.
Any Advice?
--scratch that, I want to save the Data on command lol
The General Idea is that when You do a Certain command, That Your Set to a Team using an Enum inside an Array, and On that Command it saves it so when you connect to the server after it has been restarted, youre In that team? You understand what I Mean.
So Far I Have
Код:
#define PlayerInfo "SERVERFILES/Settings/User.ini"
Код:
enum PLAYER_MAIN { FACTION_RANK, } new PlayerInfo[MAX_PLAYERS][PLAYER_MAIN];
Код:
public OnPlayerConnect(playerid) { new file[100],Name[MAX_PLAYER_NAME],Ip[16]; GetPlayerName(playerid,Name,sizeof(Name)); format(file,sizeof(file),file,Name); if(!dini_Exists(file)) { dini_Create(file); dini_Set(file,"FACTION_RANK"); } return 1; }
The Command to make the Team.
Код:
if (strcmp("/rank1", cmdtext, true) == 0) { SendClientMessage(playerid, 0xFFFF00AA,"Set To Rank 1"); PlayerInfo[playerid][FACTION_RANK] == 1; return 1; }