Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(dialogid == DIALOG_REGISTER)
- {
- if(!response) return KickIgraca(playerid);
- if(response)
- {
- if(strlen(inputtext) < 3 || strlen(inputtext) > 15)
- {
- SPD(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Registration on Riverdale DeathMatch "," The code must be longer than 3 letters or less than 15 letters!\nType in the password to register.", "Continue", "Exit" );
- return 1;
- }
- ResetVarijabli(playerid);
- gLoggedCheck[playerid] = 1;
- PlayerInfo[playerid][pSifra] = udb_hash( inputtext );
- new INI:File = INI_Open( UserPath( playerid ) );
- INI_SetTag(File, "data" );
- INI_WriteInt(File, "lozinka", udb_hash( inputtext ) );
- INI_WriteInt(File, "Admin", PlayerInfo[playerid][pAdmin] );
- INI_WriteInt(File, "Novac", PlayerInfo[playerid][pNovac] );
- INI_WriteInt(File, "Skor", PlayerInfo[playerid][pSkor] );
- INI_WriteInt(File, "Ubistva", PlayerInfo[playerid][pUbistva] );
- INI_WriteInt(File, "Smrti", PlayerInfo[playerid][pSmrti] );
- INI_WriteInt(File, "Skin", 45 );
- INI_Close( File );
- InDM[playerid] = 0;
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 100);
- SetPlayerInterior(playerid, 18);
- TogglePlayerSpectating(playerid, false);
- SetSpawnInfo(playerid,45,24,1727.2626,-1667.0796,22.0867,0,0,0,0,0,0,0);
- SpawnPlayer(playerid);
- }
- return 1;
- }
- if(dialogid == DIALOG_LOGIN)
- {
- if(!response) return KickIgraca(playerid);
- if(response)
- {
- if(udb_hash(inputtext) == PlayerInfo[playerid][pSifra])
- {
- TogglePlayerSpectating(playerid,false);
- GivePlayerMoney(playerid, PlayerInfo[playerid][pNovac]);
- SetPlayerScore(playerid, PlayerInfo[playerid][pSkor]);
- SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
- gLoggedCheck[playerid] = 1;
- SetSpawnInfo(playerid,45,PlayerInfo[playerid][pSkin],1727.2626,-1667.0796,22.0867,0,0,0,0,0,0,0);
- SetPlayerInterior(playerid, 18);
- InDM[playerid] = 0;
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 100);
- ResetPlayerWeapons(playerid);
- SpawnPlayer(playerid);
- ResetUbistvaSmrti(playerid);
- nekickaj[playerid] = 1;
- KillTimer(g_LoginTimer[playerid]);
- }
- else
- {
- SCM(playerid, -1, ""SRWPLAVA"[R:DM] "BELA"Invalid password, you are kicked from the server!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment