Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stock MySQL_Login(playerid)
- {
- new query[300];
- format(query, sizeof(query), "SELECT * FROM usuarios WHERE nick = '%s'", Nome(playerid));
- mysql_query(Conexao, query);
- mysql_store_result();
- while(mysql_fetch_row_format(query,"|"))
- {
- PlayerInfo[playerid][Level] = cache_get_field_content_int(0, "level");
- SetPlayerScore(playerid, PlayerInfo[playerid][Level]);
- PlayerInfo[playerid][Exp] = cache_get_field_content_int(0, "exp");
- PlayerInfo[playerid][Dinheiro] = cache_get_field_content_int(0, "dinheiro");
- GivePlayerMoney(playerid, PlayerInfo[playerid][Dinheiro]);
- PlayerInfo[playerid][Admin] = cache_get_field_content_int(0, "admin");
- PlayerInfo[playerid][Skin] = cache_get_field_content_int(0, "skin");
- SetPlayerSkin(playerid, PlayerInfo[playerid][Skin]);
- PlayerInfo[playerid][PosX] = cache_get_field_content_float(0, "posx");
- PlayerInfo[playerid][PosY] = cache_get_field_content_float(0, "posy");
- PlayerInfo[playerid][PosZ] = cache_get_field_content_float(0, "posz");
- cache_get_field_content(0, "email", PlayerInfo[playerid][Email], Conexao, 500);
- PlayerInfo[playerid][Fome] = cache_get_field_content_int(0, "fome");
- PlayerInfo[playerid][Sede] = cache_get_field_content_int(0, "sede");
- PlayerInfo[playerid][Sono] = cache_get_field_content_int(0, "sono");
- PlayerInfo[playerid][Rm] = cache_get_field_content_int(0, "rm");
- PlayerInfo[playerid][Rs] = cache_get_field_content_int(0, "rs");
- cache_get_field_content(0, "profissao", PlayerInfo[playerid][Profissao], Conexao, 100);
- cache_get_field_content(0, "playercor", PlayerInfo[playerid][PlayerCor], Conexao, 100);
- PlayerInfo[playerid][ContaBanco] = cache_get_field_content_int(0, "contabanco");
- PlayerInfo[playerid][SaldoBanco] = cache_get_field_content_int(0, "saldobanco");
- PlayerInfo[playerid][TemCasa] = cache_get_field_content_int(0, "temcasa");
- PlayerInfo[playerid][CasaID] = cache_get_field_content_int(0, "casaid");
- PlayerInfo[playerid][CPosX] = cache_get_field_content_float(0, "cposx");
- PlayerInfo[playerid][CPosY] = cache_get_field_content_float(0, "cposy");
- PlayerInfo[playerid][CPosZ] = cache_get_field_content_float(0, "cposz");
- }
- mysql_free_result();
- format(query, sizeof(query), "UPDATE usuarios SET IP='%s' WHERE nick='%s'",
- IP(playerid), Nome(playerid));
- mysql_query(Conexao, query);
- SendClientMessage(playerid, 0x82C0FFAA, "(CONTA) Logado com sucesso");
- PlayerInfo[playerid][pLogado] = true;
- SetTimerEx_("AtualizarGrana", 500, 1000, -1, "d", playerid);
- SetTimerEx_("FomeT", 600000, 600000, 1, "d", playerid);
- SetTimerEx_("SedeT", 400000, 400000, 1, "d", playerid);
- SetTimerEx_("SonoT", 510000, 510000, 1, "d", playerid);
- SetTimerEx_("RodapeT", 2000, 1500, 1, "d", playerid);
- PlayerInfo[playerid][pTime] = SetTimerEx_("UPLEVEL", 1500, 1000, -1, "i", playerid);
- SetPlayerColor(playerid, PlayerInfo[playerid][PlayerCor]);
- PlayerTextDrawShow(playerid, Rodape0);
- PlayerTextDrawShow(playerid, Rodape1);
- PlayerTextDrawShow(playerid, Rodape2);
- PlayerTextDrawShow(playerid, Rodape3);
- PlayerTextDrawShow(playerid, Necessidade0);
- PlayerTextDrawShow(playerid, Necessidade1);
- PlayerTextDrawShow(playerid, Necessidade2);
- PlayerTextDrawShow(playerid, Necessidade3);
- PlayerTextDrawShow(playerid, Necessidade4);
- PlayerTextDrawTextSize(playerid,Necessidade5, 530.000000 + PlayerInfo[playerid][Fome], 7.000000);
- PlayerTextDrawShow(playerid, Necessidade5);
- PlayerTextDrawShow(playerid, Necessidade6);
- PlayerTextDrawShow(playerid, Necessidade7);
- PlayerTextDrawTextSize(playerid,Necessidade8, 530.000000 + PlayerInfo[playerid][Sede], 7.000000);
- PlayerTextDrawShow(playerid, Necessidade8);
- PlayerTextDrawShow(playerid, Necessidade9);
- PlayerTextDrawShow(playerid, Necessidade10);
- PlayerTextDrawTextSize(playerid,Necessidade11, 530.000000 + PlayerInfo[playerid][Sono], 7.000000);
- PlayerTextDrawShow(playerid, Necessidade11);
- if(PlayerInfo[playerid][TemCasa] == 0)
- {
- SetSpawnInfo(playerid, 0, PlayerInfo[playerid][Skin], PlayerInfo[playerid][PosX], PlayerInfo[playerid][PosY], PlayerInfo[playerid][PosZ], 179.9741, 0, 0, 0, 0, 0, 0);
- }
- if(PlayerInfo[playerid][TemCasa] == 1)
- {
- SetSpawnInfo(playerid, 0, PlayerInfo[playerid][Skin], PlayerInfo[playerid][CPosX], PlayerInfo[playerid][CPosY], PlayerInfo[playerid][CPosZ], 179.9741, 0, 0, 0, 0, 0, 0);
- }
- SpawnPlayer(playerid);
- new query3[200];
- format(query3, sizeof(query3), "SELECT * FROM tutorial WHERE nick='%s'", Nome(playerid));
- mysql_query(Conexao, query3);
- mysql_store_result();
- new rows = mysql_num_rows();
- if(!rows)
- {
- if(!IsPlayerNPC(playerid))
- {
- if(Tuto[playerid] == 0)
- {
- TogglePlayerSpectating(playerid, 1);
- SetTimerEx_("IniciarTuto", 1000, 1000, 1, "d", playerid);
- }
- }
- }
- mysql_free_result();
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement