11.11.2018, 14:48
When i register to my server, its spawns me without letting me choose my skin.
Here is the code:
Here is photo:
https://imgur.com/a/R0A5BuA (I dont know what wrong i did.)
Also, when i fail my password it gets me where i can choose my skin and click spawn, and it spawns me! Of course you cant move but you can spawn, and thats not good! How to remove that? So when i fail my password it doesnt gets me where i can choose my player skin and spawn.
Here is code:
Heres photo:
https://imgur.com/a/g0X83aK
Help?
Here is the code:
Код:
switch( dialogid )
{
case DIALOG_REGISTER:
{
if (!response) return Kick(playerid);
if(response)
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Registering...","You have entered an invalid password.\nType your password below to register a new account.","Register","Quit");
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Cash",0);
INI_WriteInt(File,"Admin",0);
INI_WriteInt(File,"Kills",0);
INI_WriteInt(File,"Deaths",0);
INI_Close(File);
SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,"Success!","Great, now please relog to save your stats!","Ok","");
new stringl[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(stringl, sizeof(stringl), "Porsh: {FFFFFF}You've successfully registered the name ({F2D82C}%s{FFFFFF}) with the password ({F2D82C}%s{FFFFFF})", name, inputtext);
SendClientMessage(playerid, COLOR_GREEN, stringl);
}
}
Here is photo:
https://imgur.com/a/R0A5BuA (I dont know what wrong i did.)
Also, when i fail my password it gets me where i can choose my skin and click spawn, and it spawns me! Of course you cant move but you can spawn, and thats not good! How to remove that? So when i fail my password it doesnt gets me where i can choose my player skin and spawn.
Here is code:
Код:
case DIALOG_LOGIN:
{
if ( !response ) return Kick ( playerid );
if( response )
{
if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","You have entered an incorrect password.\nType your password below to login.","Login","Quit");
}
return 1;
}
}
}
Heres photo:
https://imgur.com/a/g0X83aK
Help?


