Help Needed - 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)
+--- Thread: Help Needed (
/showthread.php?tid=443198)
Help Needed -
semaj - 10.06.2013
stuck on how to add this into my GM
pawn Код:
public OnPlayerConnect(playerid)
{//you will need to put the fexist to check if the player have registered before this
new INI:File = INI_Open(UserPath(playerid));//and put the shit below when the dialog shows instead checking a something that does not exist
if(PlayerInfo[playerid][pBanned] == 1) return Ban(playerid); //now he's REALLY banned!
else
{
//show your login dialog
}
return 1;
}
My GM
pawn Код:
public OnPlayerConnect(playerid)
{
if( fexist ( user_account_path ( playerid ) ) )
{
INI_ParseFile(user_account_path ( playerid ), "load_user_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Welcome.Please log-in",""COLOR_WHITE"Type your "COLOR_GREEN"password "COLOR_WHITE"here to log-in", #Log-in, #Quit);
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"Please register!",""COLOR_WHITE"Type your "COLOR_GREEN"password "COLOR_WHITE"here to register.", #Register, #Quit);
}
userData[ playerid ][ Admin_Level ] = 0;
userData[ playerid ][ Money ] = 0;
userData[ playerid ][ Deaths ] = 0;
userData[ playerid ][ Score ] = 0;
return 1;
}
Can anyone help?
Re: Help Needed -
whando - 11.06.2013
Not sure because I don't use that but..
Код:
public OnPlayerConnect(playerid)
{//you will need to put the fexist to check if the player have registered before this
new INI:File = INI_Open(UserPath(playerid));//and put the shit below when the dialog shows instead checking a something that does not exist
if(PlayerInfo[playerid][pBanned] == 1) return Ban(playerid); //now he's REALLY banned!
else
{
if( fexist ( user_account_path ( playerid ) ) )
{
INI_ParseFile(user_account_path ( playerid ), "load_user_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Welcome.Please log-in",""COLOR_WHITE"Type your "COLOR_GREEN"password "COLOR_WHITE"here to log-in", #Log-in, #Quit);
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"Please register!",""COLOR_WHITE"Type your "COLOR_GREEN"password "COLOR_WHITE"here to register.", #Register, #Quit);
}
userData[ playerid ][ Admin_Level ] = 0;
userData[ playerid ][ Money ] = 0;
userData[ playerid ][ Deaths ] = 0;
userData[ playerid ][ Score ] = 0;
}
return 1;
}
Re : Help Needed -
NeoPro - 11.06.2013
pawn Код:
public OnPlayerConnect(playerid)
{//you will need to put the fexist to check if the player have registered before this
new INI:File = INI_Open(UserPath(playerid));//and put the shit below when the dialog shows instead checking a something that does not exist
if(PlayerInfo[playerid][pBanned] == 1) return Ban(playerid); //now he's REALLY banned!
else
{
if( fexist ( user_account_path ( playerid ) ) )
{
INI_ParseFile(user_account_path ( playerid ), "load_user_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Welcome.Please log-in",""COLOR_WHITE"Type your "COLOR_GREEN"password "COLOR_WHITE"here to log-in", #Log-in, #Quit);
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"Please register!",""COLOR_WHITE"Type your "COLOR_GREEN"password "COLOR_WHITE"here to register.", #Register, #Quit);
}
userData[ playerid ][ Admin_Level ] = 0;
userData[ playerid ][ Money ] = 0;
userData[ playerid ][ Deaths ] = 0;
userData[ playerid ][ Score ] = 0;
}
return 1;
}
Late!