Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- forward onPlayerLogin(playerid);
- public onPlayerLogin(playerid){
- switch(cache_num_rows()){
- case 0: Dialog_Show(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, ">> Autentificare", "Parola introdusa nu este corecta, te rugam sa incerci din nou.", "Login", "Cancel");
- case 1:{
- new str[64], result[256];
- PlayerInfo[playerid][pID] = cache_get_field_content_int(0, "id");
- PlayerInfo[playerid][pGender] = cache_get_field_content_int(0, "gender");
- PlayerInfo[playerid][pMoney] = cache_get_field_content_int(0, "money");
- PlayerInfo[playerid][pAdmin] = cache_get_field_content_int(0, "admin");
- PlayerInfo[playerid][pSkin] = cache_get_field_content_int(0, "model");
- cache_get_field_content(0, "name", result); format(PlayerInfo[playerid][pName], MAX_PLAYER_NAME, result);
- cache_get_field_content(0, "password", result); format(PlayerInfo[playerid][pPassword], 36, result);
- cache_get_field_content(0, "email", result); format(PlayerInfo[playerid][pEmail], 36, result);
- format(str, sizeof(str), ""#COL_SERVER">> "#COL_WHITE"Welcome back, "#COL_SERVER"%s", GetName(playerid));
- SCM(playerid, -1, str);
- SpawnPlayer(playerid);
- SetPlayerMoney(playerid, PlayerInfo[playerid][pMoney]);
- SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
- printf("Utilizatorul %s s-a autentificat pe server | IP: %s", PlayerInfo[playerid][pName], GetIP(playerid));
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement