04.06.2012, 10:27
Hi guys! I'm trying to make AutoLoggin by IP adress but... don't work Don't matter what IP i have... the script will loggin me )
pawn Код:
// (Get User Account Info)
AccInfo[ playerid ][ Logged ] = 0;
if(BUD::IsNameRegistered( PlayerName2(playerid) ) == true)
{
new pQuery[512], pField[60];
format(pQuery, 512, "SELECT `Adress` FROM `users` WHERE `name` = '%s';", PlayerName2(playerid));
Result = db_query(Database, pQuery);
db_get_field_assoc(Result, "Adress", pField, sizeof(pField));
if( strcmp(pField, GetPlayerIPEx(playerid)) == 0 ) LogPLayer(playerid);
SendInfo(playerid, "Your account is Registered! Please loggin to your account: ~r~~h~/login");
SCM:(playerid, ~1,"Your account is "G"Registered"W"! Please "R"loggin "W"to your account: "O"/"W"login");
AccInfo[ playerid ][ Admin ] = 0;
AccInfo[ playerid ][ VIP ] = 0;
AccInfo[ playerid ][ Sadmin ] = 0;
AccInfo[ playerid ][ Registered ] = 1;
}
if(BUD::IsNameRegistered( PlayerName2(playerid) ) == false)
{
new rstring[256];
format(rstring,256,""W"Welcome "YE"%s"W", on "R"San "S"Fierro "YE"Stuntage\n\n"W"Please "G"Register"W" to save your stats: "COL_ORANGE"Score,Money,Coins...", PlayerName2(playerid));
ShowPlayerDialog(playerid,RegisterDialog,DIALOG_STYLE_PASSWORD,""W"Location:"G" Register Account",rstring,"(Register)","(Quit)");
}