ZCMD & Y_INI help
#1

Well, it's annoying me:
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;
}
The ZCMD problem:

I type:
pawn Код:
/register
And register normally, with the message: Registered successfully
And on the file that has been created:
pawn Код:
// Password is weird..
Name = the_runner
Password =
Even though when I typed:
pawn Код:
/register password
Showed on the file the password as "password", normally

About Y_INI

On dini, most of people used to use:
pawn Код:
PlayerInfo[playerid][ip] = dini_Get(file, "Ip");
How do I do it on Y_INI? since have to be:
pawn Код:
INI:playerfile[](name[], value[])
{

   INI_String("GangName",GetGangName,sizeof(GetGangName));
   INI_Int("IsInGang",gang[0]);
   INI_Int("GangID",gang[1]);
   return 0;
}
Reply
#2

ZCMD ERROR FIXED
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)