11.01.2011, 18:49
Well, it's annoying me:
The ZCMD problem:
I type:
And register normally, with the message: Registered successfully
And on the file that has been created:
Even though when I typed:
Showed on the file the password as "password", normally
About Y_INI
On dini, most of people used to use:
How do I do it on Y_INI? since have to be:
pawn Код:
COMMAND:register(playerid, params[])
{
new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name));
format(playerfile,sizeof(playerfile),PLAYER,name);
if(fexist(playerfile)) return Msg(playerid, color, REGISTERED);
if(logged[playerid] == 1) return Msg(playerid, color, LOGGED);
if(!isnull(params)) return Msg(playerid, color, ""#red"USAGE: "#green"/register <password>");
new INI:file = INI_Open( playerfile );
INI_WriteString(file, "Name", name);
INI_WriteString(file, "Password", params);
logged[playerid]=1;
INI_Close(file);
Msg(playerid, color, ""#red"Registered "#green"successfully");
return 1;
}
I type:
pawn Код:
/register
And on the file that has been created:
pawn Код:
// Password is weird..
Name = the_runner
Password =
pawn Код:
/register password
About Y_INI
On dini, most of people used to use:
pawn Код:
PlayerInfo[playerid][ip] = dini_Get(file, "Ip");
pawn Код:
INI:playerfile[](name[], value[])
{
INI_String("GangName",GetGangName,sizeof(GetGangName));
INI_Int("IsInGang",gang[0]);
INI_Int("GangID",gang[1]);
return 0;
}