Slapped Together some Script and Im getting 3 Identical Errorrs,
#9

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
Код:
#define PlayerInfo         "SERVERFILES/Settings/User.ini"
As the Data Storage. And I Have Dini
Код:
enum PLAYER_MAIN {
    FACTION_RANK,
}

new PlayerInfo[MAX_PLAYERS][PLAYER_MAIN];
As The Enum.

Код:
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;
}
So When It reconnects the Data is Restored.

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;
	}
Any Advice?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)