#define peidao 1
new arquivo[500];
new nome[MAX_PLAYER_NAME];
format(arquivo, sizeof(arquivo), "contas/%s.ini", nome);
dini_IntSet(arquivo, "Emprego", PlayerJob[playerid]);
PlayerJob[playerid] = dini_Int(arquivo, "Emprego");
PlayerJob[playerid] = peidao; //Usa-se para deixar o emprego do cidadгo em peidгo.
SendClientMessage(playerid, 0xFFFFFF, "Parabйns vocк й um peidгo.");
C:\Documents and Settings\Sйrgio\Meus documentos\Downloads\AMP - TPD\SAMP - TPD\filterscripts\33.pwn(76) : warning 217: loose indentation C:\Documents and Settings\Sйrgio\Meus documentos\Downloads\AMP - TPD\SAMP - TPD\filterscripts\33.pwn(97) : warning 217: loose indentation C:\Documents and Settings\Sйrgio\Meus documentos\Downloads\AMP - TPD\SAMP - TPD\filterscripts\33.pwn(114) : warning 217: loose indentation |
public OnFilterScriptInit() { format(arquivo, sizeof(arquivo), "contas/%s.ini", nome); // --- Pickups --- // bodypickup = CreatePickup(1239, 1, 2141.4048,-1732.1564,17.2891, 0); hackpickup = CreatePickup(1239, 1, 781.3233,-1060.5305,24.8275, 0); policepickup = CreatePickup(1239,1,256.6144,69.6090,1003.6406,-1); wantedpointpickup = CreatePickup(1247, 23, 1528.3268,-1677.8229,5.8906); lawyerpickup = CreatePickup(1239,1,475.7782,-1501.5706,20.5386,0); hitmanpickup = CreatePickup(1239, 1, 688.0978,-443.2654,16.3359, 0); orderpickup = CreatePickup(1239, 1, 681.3100,-444.6037,16.3359, 0); robpickup = CreatePickup(1239, 1, 1941.0897,-2110.6958,13.6953, 0); hackpcpickup = CreatePickup(1239, 1, 1123.9536,-2036.9503,69.8856, 0); return 1; } public OnFilterScriptExit() { return 1; } #endif public OnPlayerConnect(playerid) { dini_IntSet(arquivo, "Emprego", PlayerJob[playerid]); PlayerOffered[playerid] = 999; PlayerTicket[playerid] = 999; PlayerDefense[playerid] = 999; PlayerJob[playerid] = 0; SetPlayerMapIcon(playerid, 94, 2141.4048,-1732.1564,17.2891, 44, 0); // BodyGuard MapIcon SetPlayerMapIcon(playerid, 95, 781.3233,-1060.5305,24.8275, 43, 0); // Hacker MapIcon SetPlayerMapIcon(playerid, 96, 255.5585,64.1626,1003.6406, 30, 0); // Police ( Interior! - Los Santos Police Department, Lobby - Right corner ) SetPlayerMapIcon(playerid, 97, 475.7782,-1501.5706,20.5386, 44, 0); // Lawyer MapIcon SetPlayerMapIcon(playerid, 98, 688.0978,-443.2654,16.3359, 43, 0); // Hitman MapIcon SetPlayerMapIcon(playerid, 99, 1941.0897,-2110.6958,13.6953, 43, 0); // Robber MapIcon return 1; } public OnPlayerDisconnect(playerid, reason) { PlayerJob[playerid] = dini_Int(arquivo, "Emprego"); return 1; } |
format(arquivo, sizeof(arquivo), "contas/%s.ini", nome); //Й usado para gravar em um arquivo, nгo use neste retorno.
dini_IntSet(arquivo, "Emprego", PlayerJob[playerid]); //Nгo й ae ele usa-se em desconexгo.
PlayerJob[playerid] = dini_Int(arquivo, "Emprego"); //Ponha em seu sistema de registro.
public OnPlayerConnect(playerid) { format(arquivo, sizeof(arquivo), "contas/%s.ini", nome); PlayerJob[playerid] = dini_Int(arquivo, "Emprego"); PlayerOffered[playerid] = 999; PlayerTicket[playerid] = 999; PlayerDefense[playerid] = 999; PlayerJob[playerid] = 0; SetPlayerMapIcon(playerid, 94, 2141.4048,-1732.1564,17.2891, 44, 0); // BodyGuard MapIcon SetPlayerMapIcon(playerid, 95, 781.3233,-1060.5305,24.8275, 43, 0); // Hacker MapIcon SetPlayerMapIcon(playerid, 96, 255.5585,64.1626,1003.6406, 30, 0); // Police ( Interior! - Los Santos Police Department, Lobby - Right corner ) SetPlayerMapIcon(playerid, 97, 475.7782,-1501.5706,20.5386, 44, 0); // Lawyer MapIcon SetPlayerMapIcon(playerid, 98, 688.0978,-443.2654,16.3359, 43, 0); // Hitman MapIcon SetPlayerMapIcon(playerid, 99, 1941.0897,-2110.6958,13.6953, 43, 0); // Robber MapIcon return 1; } public OnPlayerDisconnect(playerid, reason) { dini_IntSet(arquivo, "Emprego", PlayerJob[playerid]); return 1; } |
if(PlayerJob[playerid] = peidao) return SendClientMessage(playerid, 0xFFFFFF, "Parabйns vocк й um peidгo.");
public OnPlayerConnect(playerid) { format(arquivo, sizeof(arquivo), "contas/%s.ini", nome); PlayerJob[playerid] = dini_Int(arquivo, "Emprego"); if(PlayerJob[playerid] = 1) return SendClientMessage(playerid, 0xFFFFFF, "Bem vindo novamente Guarda-Costas!"); if(PlayerJob[playerid] = 2) return SendClientMessage(playerid, 0xFFFFFF, "Bem vindo novamente Hacker!"); if(PlayerJob[playerid] = 3) return SendClientMessage(playerid, 0xFFFFFF, "Bem vindo novamente Policial!"); if(PlayerJob[playerid] = 4) return SendClientMessage(playerid, 0xFFFFFF, "Bem vindo novamente Advogado!"); if(PlayerJob[playerid] = 5) return SendClientMessage(playerid, 0xFFFFFF, "Bem vindo novamente Matador!"); if(PlayerJob[playerid] = 6) return SendClientMessage(playerid, 0xFFFFFF, "Bem vindo novamente Ladrгo!"); PlayerOffered[playerid] = 999; PlayerTicket[playerid] = 999; PlayerDefense[playerid] = 999; PlayerJob[playerid] = 0; SetPlayerMapIcon(playerid, 94, 2141.4048,-1732.1564,17.2891, 44, 0); // BodyGuard MapIcon SetPlayerMapIcon(playerid, 95, 781.3233,-1060.5305,24.8275, 43, 0); // Hacker MapIcon SetPlayerMapIcon(playerid, 96, 255.5585,64.1626,1003.6406, 30, 0); // Police ( Interior! - Los Santos Police Department, Lobby - Right corner ) SetPlayerMapIcon(playerid, 97, 475.7782,-1501.5706,20.5386, 44, 0); // Lawyer MapIcon SetPlayerMapIcon(playerid, 98, 688.0978,-443.2654,16.3359, 43, 0); // Hitman MapIcon SetPlayerMapIcon(playerid, 99, 1941.0897,-2110.6958,13.6953, 43, 0); // Robber MapIcon return 1; } public OnPlayerDisconnect(playerid, reason) { dini_IntSet(arquivo, "Emprego", PlayerJob[playerid]); return 1; } |