09.02.2014, 14:52
Hello guys. I need help. I've downloaded prrp gamemode, but everytime I register ingame, it says ''Server closed the connection''..
How to fix that?
Thanks!
How to fix that?
Thanks!
}
case 37: // Register dialog
{
switch(response)
{
case 0: SendClientMessage(playerid,COLOR_WHITE,"This name is not registered, please create an account /register [password].");
case 1: // Registering password
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,37,DIALOG_STYLE_PASSWORD,"Server Account","There is no existing account using your playername, please create a new account.\nIf you can't support this dialog select the (next) option.","Register", "Next");
if(strlen(inputtext) >= 31)
{
SendClientMessage(playerid, COLOR_WHITE, "Password is too long (30 Chars max).");
ShowPlayerDialog(playerid,37,DIALOG_STYLE_PASSWORD,"Server Account","There is no existing account using your playername, please create a new account.\nIf you can't support this dialog select the (next) option.","Register", "Next");
return 1;
}
OnPlayerRegister(playerid,inputtext);
}
}
public OnPlayerRegister(playerid, password[])
{
if(IsPlayerConnected(playerid))
{
new string[128], passwordex[128];
format(string, sizeof(string), "users/%s.ini", PlayerName(playerid));
if(!DOF2_FileExists(string))
{
DOF2_CreateFile(string);
format(passwordex, 128, "%s", password);
Hash(passwordex);
DOF2_SetString(string, "Key", passwordex);
DOF2_SetInt(string, "Convert", 5);
DOF2_SetInt(string, "Hashed", 1);
DOF2_SetFloat(string, "PosX", 1642.7285);
DOF2_SetFloat(string, "PosY", -2240.5591);
DOF2_SetFloat(string, "PosZ", 13.4945);
DOF2_WriteFile();
CallRemoteFunction("OnPlayerLogin","is",playerid,password);
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "Unable to register, account exists.");
KickEx(playerid);
}
}
return 1;
}