Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //EMPREGOS//
- #define DESEMPREGADO 0
- #define MOTORISTA_ONIBUS 1
- #define TAXISTA 2
- #define PILOTO 3
- enum pLeo {
- pSenhaInvalida,
- Senha,
- Matou,
- Morreu,
- Dinheiro,
- Profissao,
- Level
- }
- new PlayerLeo[MAX_PLAYERS][pLeo];
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_TRANSPORTES) {
- if(response) {
- switch(listitem) {
- case 0: { //Petroleiro
- }
- case 1: { //Transportador
- }
- case 2: { //Minerador
- }
- case 3:
- {
- if(PlayerLeo[playerid][Profissao] == PILOTO)
- {
- SendClientMessage(playerid, -1, "| ERRO | Você já é um piloto!");
- return 1;
- }
- if(PlayerLeo[playerid][Level] >= 15)
- {
- SendClientMessage(playerid, -1, "Parabéns agora você é um Piloto");
- PlayerLeo[playerid][Profissao] = PILOTO;
- SetPlayerColor(playerid, COR_PILOTO);
- }
- return 1;
- }
- stock SalvarContas(playerid)
- {
- if(!DOF2_FileExists(Contas(playerid))) DOF2_CreateFile(Contas(playerid));
- else
- {
- PlayerLeo[playerid][Dinheiro] = GetPlayerMoney(playerid);
- DOF2_SetInt(Contas(playerid), "Senha", PlayerLeo[playerid][Senha]);
- DOF2_SetInt(Contas(playerid), "Matou", PlayerLeo[playerid][Matou]);
- DOF2_SetInt(Contas(playerid), "Morreu", PlayerLeo[playerid][Morreu]);
- DOF2_SetInt(Contas(playerid), "Dinheiro", GetPlayerMoney(playerid));
- DOF2_SetInt(Contas(playerid), "Profissao", PlayerLeo[playerid][Profissao]);
- DOF2_SetInt(Contas(playerid), "Level", GetPlayerScore(playerid));
- DOF2_SaveFile();
- }
- return 1;
- }
- stock CarregarConta(playerid)
- {
- SetPlayerScore(playerid, DOF2_GetInt(Contas(playerid), "Level"));
- GivePlayerMoney(playerid, DOF2_GetInt(Contas(playerid), "Dinheiro"));
- PlayerLeo[playerid][Matou] = DOF2_GetInt(Contas(playerid), "Matou");
- PlayerLeo[playerid][Morreu] = DOF2_GetInt(Contas(playerid), "Morreu");
- PlayerLeo[playerid][Profissao] = DOF2_GetInt(Contas(playerid), "Profissao");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement