Understanding y_ini.
#2

I little search in the y_ini topic

Quote:
Originally Posted by Zh3r0
Посмотреть сообщение
pawn Код:
//Outside anything
//public to check the password and insert the value found at name Password.
forward ParsePass( playerid, name[], value[] );
public ParsePass( playerid, name[], value[] )
{
    if ( !strcmp( name, "Password" )) SetPVarString( playerid, "pPass", value );
}

//Command, or any function

//Parses Password from a file.
INI_ParseFile("myini.ini","ParsePass", .bExtra = true, .extra = playerid);

//Variable to store the pass
new pPass[ 129 ];

//Function to get the password inserted in the PVarString at the ParsePass public
GetPVarString( playerid, "pPass", pPass, sizeof (pPass) );

//Send message with the password.
new Str[ 129 ];
format( Str, sizeof (Str), "Your password: %s", pPass );
SendClientMessage( playerid, -1, Str );
Reply


Messages In This Thread
Understanding y_ini. - by sekol - 13.03.2011, 16:08
AW: Understanding y_ini. - by Nero_3D - 13.03.2011, 17:39
Re: Understanding y_ini. - by sekol - 14.03.2011, 06:36

Forum Jump:


Users browsing this thread: 1 Guest(s)