ZCMD & Y_INI help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: ZCMD & Y_INI help (
/showthread.php?tid=209889)
ZCMD & Y_INI help -
blackwave - 11.01.2011
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:
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:
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;
}
Re: ZCMD & Y_INI help -
blackwave - 11.01.2011
ZCMD ERROR FIXED