Quantcast
Channel: SA-MP Forums
Viewing all 18226 articles
Browse latest View live

[Ajuda] Complicação de Spawn

$
0
0
Boas estava acabando o sistema de level, e me pensei no sistema de profissões.

Como irei fazer tipo se o cara e " PlayerInfo[ playerid ][ pProfissao ] = Fotografo; "

ele spanará no local que eu configurei poderão me dar uma base?

obrigado desde já :p


#EDIT, ao logar no servidor verifica-va a profissão e mandava para a posição

Custom object as pickup (yellow question mark)

$
0
0
Model in kdffgui.exe (everything is okay with .txd and .dff file).





Is it even possible to show custom object as a pickup?

PHP Code:

CreatePickup(-22001COORDS_GROVE); 

MySQL plugin for windows xp server

$
0
0
I'm creating a gamemode and I'm going to use MySQL to save and load player data, I used three different plugins and all three, give me error: who runtime error 19 other error not registered function. I installed all the possible frameworks (4.0) last for my operating system Windows XP SP3 and I have not solved anything: I still have errors. Is there any way to make some MySQL plugins work in this operating system? Or should I change OS or host a server for 2 - 3 months in vain? I ask for help
I apologize for my poor English

How to check in what city player is?

$
0
0
I want to check if a player is in los santos , or las venturs , or san fierro
on a timer one second, example : ShadowBlack is in SF

Help convert command to ZCMD

$
0
0
Anyone can help convert it to ZCMD?

Code:

if(strcmp(cmd, "/parduoti", true) == 0)
        {
        tmp = strtok(cmdtext, idx);
                if (!strlen(tmp))
                {
                    SendClientMessage(playerid, 0xFFFFFFAA, " /pcarsell [playerid] [Preis]");
            return 1;
        }
        new sellplayerid = ReturnUser(tmp);
        tmp = strtok(cmdtext, idx);
                if (!strlen(tmp))
                {
                    SendClientMessage(playerid, 0xFFFFFFAA, "/pcarsell [playerid] [Geld]");
            return 1;
        }
        new preis = strval(tmp);
        if (preis<0)
        {
                    SendClientMessage(playerid, 0xFFFFFFAA, "Bloga kaina.");
            return 1;
        }
            if (Carlist[playerid][Typ]==-1)
            {
                SendClientMessage(playerid, 0xFFFFFFAA, "Neturite automobilio!");
                return 1;
            }
        if (!IsPlayerConnected(sellplayerid))
        {
                    SendClientMessage(playerid, 0xFFFFFFAA, "Žaidėjas atsijungęs.");
            return 1;
        }
        bietetAn[sellplayerid][0]=playerid;
                bietetAn[sellplayerid][1]=preis;
                new playername[MAX_PLAYER_NAME];
                new sellplayername[MAX_PLAYER_NAME];
                GetPlayerName(playerid,playername,sizeof(playername));
                GetPlayerName(sellplayerid,sellplayername,sizeof(sellplayername));
                format(string,128,"Žaidėjui %s siūlote automobilį už %i ",sellplayername,preis);
                SendClientMessage(playerid, 0xFFFFFFAA, string);
                SendClientMessage(playerid, 0xFFFFFFAA, "Kad atšaukti pardavime rašykite /atsaukti.");
        format(string,128,"%s siūlo automobilį %s už $%i .",playername,Kaufliste[Carlist[playerid][Typ]][Name],preis);
        SendClientMessage(sellplayerid, 0xFFFFFFAA, string);
        SendClientMessage(sellplayerid, 0xFFFFFFAA, "Jeigu jums tenkina suma rašykite /priimti.");
            return 1;
        }

Please guys i need help :(

$
0
0
hey guys i make cmd but i don't know how to make it good like this

i do that : Your balance is $700000000
but i want like this : Your balance is $700.000.000

Attached Images
File Type: png Sans titre.PNG (44.7 KB)

Garage by Gucci Made It

[Ajuda] Comando /lider bugado help

$
0
0
meu comando /lider quando uso ele fica dando líder mesmo se a org já possuir um lider e o nick do líder não vai para o /orgs continua escrito lá "ninguém" podem ajudar nessa?

meu comando /lider abaixo
https://pastebin.com/uCE0wVLD

Apartment by Gucci Made It

Interior Problem

[Ajuda] Health Veículo

$
0
0
carPM[1] = AddStaticVehicleEx(427,1584.4525,-1667.6807,5.7846,90.3542,79,1,60000);

esse é o veiculo, queria botar ele com uma vida maior, o valor padrão é 1000, queria colocar uns 3000 pra demorar um pouco mais para explodir esse veículo.
Coloquei: SetVehicleHealth(carPM[1], 3000);

porém ele repara sozinho, não deixa a vida do veiculo diminuir, alguem pode me ajudar?

Again

$
0
0
Well again I have a problem, My gamemode has a problem with private messages, when you try to send a private message it sends it but it does not appear complete it always cuts part of the message and I do not know what to do and tried many things but I have no solution, that always happens to me when I add this include #include <sscanf> if I remove that include the / pm command works correctly but when I place it, the messages of some server functions come out shortened, with that include another command that I have and I put the include so that operate this command

This cmd work with sscanf include but without sscanf not work
Code:

CMD:searchcar(playerid,params[])
{
    new idvp,ncar[600],StringSECH[1140],STRCCHAR[1140];
    if(sscanf(params,"sT[600]",ncar))return SendClientMessage(playerid,red,"Use: /SearchCar [CarName]");
    idvp = GetVehicleModelIDFromName(ncar);
    for(new i=0;i<MAX_VEHICLES;i++){
    if(VehicleInfo[i][model] == idvp && VehicleInfo[i][Temp] == false){
    format(StringSECH,sizeof(StringSECH),"{FFFAFA}Vehicle:{00FF00} %s | {FFFAFA}Owner:{00FF00} %s\n",VehicleName[GetVehicleModel(i)-400],VehicleInfo[i][owner],i);
    strcat(STRCCHAR,StringSECH);}}
    new dname[MAX_PLAYER_NAME];
    new string[128];
    format(string,sizeof(string),"17 %s ID(%d) Has Used Command /Searchcar",dname,playerid,params);
    IRC_GroupSay(groupID, IRC_ADMINCHANNEL, string);
    ShowPlayerDialog(playerid,601,DIALOG_STYLE_MSGBOX ,"{FFFF00}Search Car",STRCCHAR, "Ok", "");
    return 1;
}

This is the code of pm cmd

Code:

CMD:pm(playerid,params[]) {
    if(PlayerInfo[playerid][Muted] == 1)
        {
                PlayerInfo[playerid][MuteWarnings]++;
                new string[128];
                if(PlayerInfo[playerid][MuteWarnings] < ServerInfo[MaxMuteWarnings]) {
                        format(string, sizeof(string),"WARNING: You are muted, if you continue to speak you will be kicked. (%d / %d)", PlayerInfo[playerid][MuteWarnings], ServerInfo[MaxMuteWarnings] );
                        SendClientMessage(playerid,red,string);
                } else {
                        SendClientMessage(playerid,red,"You have been warned ! Now you have been kicked");
                        format(string, sizeof(string),"***%s (ID %d) was kicked for exceeding mute warnings", PlayerName2(playerid), playerid);
                        SendClientMessageToAll(grey,string);
                        SaveToFile("KickLog",string); Kick(playerid);
                }
                return 0;
        }
        new id, gMessage[128],Message[128],iName[MAX_PLAYER_NAME], pmName[MAX_PLAYER_NAME];
        if (sscanf(params, "is",id,gMessage)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /pm <ID> <Message>");
        if(!IsPlayerConnected(id)) {
                SendClientMessage(playerid,ADMINFS_MESSAGE_COLOR,"/pm : Bad player ID");
                return 1;
        }
        if(playerid == id) {
                SendClientMessage(playerid,ADMINFS_MESSAGE_COLOR,"You cannot PM yourself");
                return 1;
        }
        if(ServerInfo[ReadPMs] == 1 && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel])
        {
            new string[128],recievername[MAX_PLAYER_NAME],string2[128];
                GetPlayerName(playerid, string, sizeof(string)); GetPlayerName(id, recievername, sizeof(recievername));
                format(string, sizeof(string), "***[PM]: %s To %s: %s", string, recievername, gMessage);
                IRC_GroupSay(groupID, IRC_ADMINCHANNEL, string);
                for (new a = 0; a < MAX_PLAYERS; a++) if ((PlayerInfo[a][Level] >= ServerInfo[MaxAdminLevel]) && a != playerid)
                SendClientMessage(a, grey, string);
        }
        if(PlayerInfo[playerid][Muted] == 1)
        {
                new string[128];
                PlayerInfo[playerid][MuteWarnings]++;
                if(PlayerInfo[playerid][MuteWarnings] < ServerInfo[MaxMuteWarnings]) {
                        format(string, sizeof(string),"WARNING: You are muted, if you continue to speak you will be kicked (Warning: %d/%d)", PlayerInfo[playerid][MuteWarnings], ServerInfo[MaxMuteWarnings] );
                        SendClientMessage(playerid,red,string);
                } else {
                        SendClientMessage(playerid,red,"You have been warned! Now you have been kicked");
                        GetPlayerName(playerid, string, sizeof(string));
                        format(string, sizeof(string),"%s [ID %d] Kicked for exceeding mute warnings", string, playerid);
                        SendClientMessageToAll(grey,string);
                        SaveToFile("KickLog",string); Kick(playerid);
                }
                return 0;
        }
        GetPlayerName(id,iName,sizeof(iName));
        GetPlayerName(playerid,pmName,sizeof(pmName));
    new tmp[128], tmp2[128], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
        new player1 = strval(tmp);
        if(PlayerInfo[player1][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
        format(Message,sizeof(Message),">> %s(%d): %s",iName,id,gMessage);
        SendClientMessage(playerid,PM_OUTGOING_COLOR,Message);
        format(Message,sizeof(Message),"** %s(%d): %s",pmName,playerid,gMessage);
        SendClientMessage(id,PM_INCOMING_COLOR,Message);
        PlayerPlaySound(id,1085,0.0,0.0,0.0);
        printf("PM: %s",Message);
        return 1;
}

With the include sscanf the /searchcar works but without the sscanf it does not work but it works without problems the /pm, as it could work the 2 correctly...
that's why I put the issue of the pm command called '' error '' but I might have a solution to this problem

Players keep getting this message: "Lost connection to the server"

$
0
0
Hello,
I recently installed on a fresh installation of Ubuntu Server 16.04 LTS 64 bit, a SA:MP server (0.3-DL) and started the server (clean server, default gamemode etc; changed the default rcon password and that's it).
The problem is that after one or more players connect to the server, they will get a message saying that the connection to the server has been lost and the server is restarting. Due to the fact that after that message, SA:MP will try to reconnect instantly, they will get a message about an "unacceptable nickname" (because the player doesn't get kicked out of the server when they get the message with the restarting server, and immediately after they will try to reconnect even if the first connection isn't closed; so there will be 2 connections from the same player, just because they lose the first connection). The server itself DOES NOT restart.

The server.log doesn't tell me anything that could be of interest:
[06:31:46] [connection] incoming connection: 31...:55069 id: 1
[06:31:59] [connection] incoming connection: 31....:55078 id: 1
[06:32:25] [connection] incoming connection: 109...:61409 id: 1
[06:32:49] [connection] incoming connection: 109...:61410 id: 2
[06:32:59] [part] X has left the server (1:0)
[06:33:16] [connection] incoming connection: 31....:61691 id: 1
[06:57:02] [part] Y has left the server (0:0)
[07:18:46] [connection] incoming connection: 109...:56227 id: 0
[07:18:47] [join] Daniel_Chase has joined the server (0:109...)
[07:21:46] [connection] incoming connection: 109.....:64689 id: 2
[07:21:47] [connection] incoming connection: 31...:60617 id: 2
[07:21:59] [part] X has left the server (0:0)
[07:22:01] [part] Y has left the server (1:0)


TLDR: fresh install of ubuntu server 16.04 LTS 64 bit and fresh install of a SA:MP server (0.3-DL) => players keep getting the message "lost connection to the server" + "this server is restarting", even if the server itself DOES NOT restart.

Thank you.

mysql connecting

$
0
0
i have this
#define MYSQL_HOSTNAME "127.0.0.1"
#define MYSQL_DATABASE "server824db"
#define MYSQL_USERNAME "server824db"

but idk how to connect it using mysql plugin.

[17:27:35] [debug] mysql_unprocessed_queries

[17:27:35] [debug] WP_Hash

[Ajuda] Ajuda callback dialogresponse

$
0
0
Linhas que dão erro:

PHP Code:

new string256 ], File150 ];
Format(Filesizeof(File), LocalContasPlayerName(playerid)); 

Callback inteira:

PHP Code:

public OnDialogResponse(playeriddialogidresponselistiteminputtext[]) {

    new 
string256 ], File150 ];
    
format(Filesizeof(File), LocalContasPlayerName(playerid));

    if(
dialogid == AVISO)
    {
        if(
response == 1)
        {
            if(
PlayerInfo[playerid][pLogado] == 0)
            {
                if(!
dini_Exists(File))
                {
                    
format(stringsizeof(string), "{FFFFFF}Seja Bem-vindo(a) Pela primeira vez ao servidor!\n\n{33AAFF}Nick: {FFFFFF}%s\n{33AAFF}Conta: {FF0000}Não Registrado(a)!\n\n{FFFFFF}Digite uma senha para Registrar-se."PlayerName(playerid));
                    
ShowPlayerDialog(playeridREGISTRODIALOG_STYLE_PASSWORD"• Registro"string"Registrar""Sair");
                }
                if(
dini_Exists(File))
                {
                    
format(stringsizeof(string), "{FFFFFF}Seja Bem-vindo(a) Novamente ao servidor!\n\n{33AAFF}Nick: {FFFFFF}%s\n{33AAFF}Conta: {00FF00}Registrado(a)!\n\n{FFFFFF}Digite sua senha para Logar-se."PlayerName(playerid));
                    
ShowPlayerDialog(playeridLOGINDIALOG_STYLE_PASSWORD"• Login"string"Logar""Sair");
                }
            }
        }
        else
        {
            
GameTextForPlayer(playerid,"~r~KICKADO!"30003);
            
Kick(playerid);
        }
    }

    if(
dialogid == REGISTRO)
    {
        if(
response == 1)
        {
            if(
strlen(inputtext) < MIN_SENHA || strlen(inputtext) > MAX_SENHA)
            {
                new 
STRX250 ];
                
format(STRXsizeof(STRX), "| ERRO | Sua senha deve ter entre %d e %d caracteres!"MIN_SENHAMAX_SENHA);
                
SendClientMessage(playeridVermelhoSTRX);
                
                
format(stringsizeof(string), "{FFFFFF}Seja Bem-vindo(a) Pela primeira vez ao servidor!\n\n{33AAFF}Nick: {FFFFFF}%s\n{33AAFF}Conta: {FF0000}Não Registrado(a)!\n\n{FFFFFF}Digite uma senha para Registrar-se."PlayerName(playerid));
                
ShowPlayerDialog(playeridREGISTRODIALOG_STYLE_PASSWORD"• Registro"string"Registrar""Sair");
                return 
1;
            }
            
dini_Create(File);
            
dini_Set(File"Senha"inputtext);
            
dini_Set(File"Profissao""0");
            
dini_Set(File"Level""0");
            
dini_Set(File"Dinheiro""0");
            
dini_Set(File"Admin""0");
            
GivePlayerGrana(playerid5000);
            
            
SendClientMessage(playerid0x808080AA"* Registrado(a) com sucesso!");
            
SpawnPlayer(playerid);
            
            
PlayerInfoplayerid ][ pProfissao ] = Desempregado;
            
PlayerInfoplayerid ][ pLogado ] = 1;
            
PlayerInfoplayerid ][ pLevel ] = 0;
            
SetarProfissao(playerid);
            
minUP[playerid] = 29;
            
segUP[playerid] = 59;
        }
        else
        {
            
GameTextForPlayer(playerid,"~r~KICKADO!"30003);
            
Kick(playerid);
        }
    }
    
    if(
dialogid == LOGIN)
    {
        new 
string256 ], File150 ];
        if(!
strlen(inputtext))
        {
            
SendClientMessage(playeridVermelho"| ERRO | Digite sua senha para Logar-se!");
            return 
1;
        }
        if(
response == 1)
        {
            new 
Password[256];
            
Password dini_Get(File"Senha");
            
            if(
strcmp(inputtextPasswordtrue) == 0)
            {
                
PlayerInfoplayerid ][ pAdmin ] = dini_Int(File"Admin");
                
PlayerInfoplayerid ][ pProfissao ] = dini_Int(File"Profissao");
                
SetPlayerScore(playeriddini_Int(File"Level"));
                
GivePlayerGrana(playeriddini_Int(File"Dinheiro"));
                
PlayerInfoplayerid ][ pLogado ] = 1;
                
SetarProfissao(playerid);
                
                
SendClientMessage(playerid0x808080AA"* Logado(a) com sucesso!");
                
SpawnPlayer(playerid);
                
                
segUP[playerid] = dini_Int(File"SegundosUP");
                
minUP[playerid] = dini_Int(File"MinutosUP");
            }
            else
            {
                
PlayerInfo[playerid][pErroSenha]++;
                if(
PlayerInfo[playerid][pErroSenha] >= 3)
                {
                    
format(stringsizeof(string), "| INFO-SERVER | O(A) Jogador(a) %s (%d) foi kickado do servidor! ( Motivo: Senha Incorreta )"PlayerName(playerid), playerid);
                    
SendClientMessageToAll(Vermelhostring);
                    
Kick(playerid);
                }
                else
                {
                    new 
ErroPW256 ];
                    
format(ErroPWsizeof(ErroPW), "• Senha Incorreta ( %d / 3 )"PlayerInfoplayerid ][ pErroSenha ]);
                    
SendClientMessage(playeridVermelhoErroPW);

                    
format(stringsizeof(string), "{FFFFFF}Seja Bem-vindo(a) Novamente ao servidor!\n\n{33AAFF}Nick: {FFFFFF}%s\n{33AAFF}Conta: {00FF00}Registrado(a)!\n\n{FFFFFF}Digite sua senha para Logar-se."PlayerName(playerid));
                    
ShowPlayerDialog(playeridLOGINDIALOG_STYLE_PASSWORD"• Login"string"Logar""Sair");
                }
            }
        }
        else
        {
            
GameTextForPlayer(playerid,"~r~KICKADO!"30003);
            
Kick(playerid);
        }
    }
    
    
//Profissões
    
    
if(dialogid == MenuAgencia)
    {
        if(
response)
        {
            if(
listitem == 0)
            {
                
ShowPlayerDialog(playeridHonestasDIALOG_STYLE_TABLIST_HEADERS"Profissões » Honestas""Profissão\t{33AAFF}Level\t{008000}Salário\nFotografo\t{33AAFF}0\t{008000}$600,00\nParamedico\t{33AAFF}5\t{008000}$700,00""Selecionar""Voltar");
            }
            if(
listitem == 1)
            {
                
ShowPlayerDialog(playeridTransportesDIALOG_STYLE_TABLIST_HEADERS"Profissões » Transportes""Profissão\t{33AAFF}Level\t{008000}Salário\nPetroleiro\t{33AAFF}0\t{008000}$1.100,00\nConcreteiro\t{33AAFF}10\t{008000}$1.200,00""Selecionar""Voltar");
            }
            if(
listitem == 2)
            {
                
ShowPlayerDialog(playeridPoliciasDIALOG_STYLE_TABLIST_HEADERS"Profissões » Policias""Profissão\t{33AAFF}Level\t{008000}Salário\nPolícia Militar\t{33AAFF}50\t{008000}$2.100,00\nInterpol\t{33AAFF}200\t{008000}$2.500,00""Selecionar""Voltar");
            }
            if(
listitem == 3)
            {
                
ShowPlayerDialog(playeridForcasArmadasDIALOG_STYLE_TABLIST_HEADERS"Profissões » ForcasArmadas""Profissão\t{33AAFF}Level\t{008000}Salário\nExército\t{33AAFF}700\t{008000}$3.000,00\nAéronautica\t{33AAFF}800\t{008000}$3.500,00""Selecionar""Voltar");
            }
        }
    }
    if(
dialogid == Honestas)
    {
        if(
response)
        {
            if(
listitem == 0)
            {
                if(
GetPlayerScore(playerid) >= 0
                {
                    
SendClientMessage(playerid0x008080AA"~~~~~~~~~~~~~~~~~~~~~~~ Fotografo ~~~~~~~~~~~~~~~~~~~~~~~");
                    
SendClientMessage(playerid0xFFFFFFAA"» Seu curriculo foi aceito nesta Profissão!");
                    
SendClientMessage(playerid0xFFFFFFAA"» Agora você trabalha como Fotografo!");
                    
SendClientMessage(playerid0xFFFFFFAA"» Você passará a receber um salário de {008000}$600,00");
                    
SendClientMessage(playerid0x008080AA"~~~~~~~~~~~~~~~~~~~~~~~ Fotografo ~~~~~~~~~~~~~~~~~~~~~~~");

                    
PlayerInfoplayerid ][ pProfissao ] = Fotografo;
                    
SetarProfissao(playerid);
                }
            }
            if(
listitem == 1)
            {
                if(
GetPlayerScore(playerid) >= 5)
                {
                    
SendClientMessage(playerid0x008080AA"~~~~~~~~~~~~~~~~~~~~~~~ Paramedico ~~~~~~~~~~~~~~~~~~~~~~~");
                    
SendClientMessage(playerid0xFFFFFFAA"» Seu curriculo foi aceito nesta Profissão!");
                    
SendClientMessage(playerid0xFFFFFFAA"» Agora você trabalha como Paramedico!");
                    
SendClientMessage(playerid0xFFFFFFAA"» Você passará a receber um salário de {008000}$700,00");
                    
SendClientMessage(playerid0x008080AA"~~~~~~~~~~~~~~~~~~~~~~~ Paramedico ~~~~~~~~~~~~~~~~~~~~~~~");

                    
PlayerInfoplayerid ][ pProfissao ] = Paramedico;
                    
SetarProfissao(playerid);
                }
                else
                {
                    
SendClientMessage(playerid0xFF0000AA"| ERRO | Você não tem level suficiente para pegar esta Profissão!");
                }
            }
        }
        else
        {
            
ShowPlayerDialog(playeridMenuAgenciaDIALOG_STYLE_LIST"Agência de Empregos""Honestas\nTransporte\nPolicia\nForças Armadas""Selecionar""Fechar");
        }
    }
    if(
dialogid == Transportes)
    {
        if(
response)
        {
            if(
listitem == 0)
            {
                if(
GetPlayerScore(playerid) >= 0)
                {
                    
SendClientMessage(playerid0x008080AA"~~~~~~~~~~~~~~~~~~~~~~~ Petroleiro ~~~~~~~~~~~~~~~~~~~~~~~");
                    
SendClientMessage(playerid0xFFFFFFAA"» Seu curriculo foi aceito nesta Profissão!");
                    
SendClientMessage(playerid0xFFFFFFAA"» Agora você trabalha como Petroleiro!");
                    
SendClientMessage(playerid0xFFFFFFAA"» Você passará a receber um salário de {008000}$1.100,00");
                    
SendClientMessage(playerid0x008080AA"~~~~~~~~~~~~~~~~~~~~~~~ Petroleiro ~~~~~~~~~~~~~~~~~~~~~~~");

                    
PlayerInfoplayerid ][ pProfissao ] = Petroleiro;
                    
SetarProfissao(playerid);
                }
            }
            if(
listitem == 1)
            {
                if(
GetPlayerScore(playerid) >= 10)
                {
                    
SendClientMessage(playerid0x008080AA"~~~~~~~~~~~~~~~~~~~~~~~ Concreteiro ~~~~~~~~~~~~~~~~~~~~~~~");
                    
SendClientMessage(playerid0xFFFFFFAA"» Seu curriculo foi aceito nesta Profissão!");
                    
SendClientMessage(playerid0xFFFFFFAA"» Agora você trabalha como Concreteiro!");
                    
SendClientMessage(playerid0xFFFFFFAA"» Você passará a receber um salário de {008000}$1.200,00");
                    
SendClientMessage(playerid0x008080AA"~~~~~~~~~~~~~~~~~~~~~~~ Concreteiro ~~~~~~~~~~~~~~~~~~~~~~~");

                    
PlayerInfoplayerid ][ pProfissao ] = Concreteiro;
                    
SetarProfissao(playerid);
                }
                else
                {
                    
SendClientMessage(playerid0xFF0000AA"| ERRO | Você não tem level suficiente para pegar esta Profissão!");
                }
            }
        }
        else
        {
            
ShowPlayerDialog(playeridMenuAgenciaDIALOG_STYLE_LIST"Agência de Empregos""Honestas\nTransporte\nPolicia\nForças Armadas""Selecionar""Fechar");
        }
    }
    if(
dialogid == Policias)
    {
        if(
response)
        {
            if(
listitem == 0)
            {
                if(
GetPlayerScore(playerid) >= 50)
                {
                    
SendClientMessage(playerid0x008080AA"~~~~~~~~~~~~~~~~~~~~~~~ Polícia Militar ~~~~~~~~~~~~~~~~~~~~~~~");
                    
SendClientMessage(playerid0xFFFFFFAA"» Seu curriculo foi aceito nesta Profissão!");
                    
SendClientMessage(playerid0xFFFFFFAA"» Agora você é um Polícial Militar!");
                    
SendClientMessage(playerid0xFFFFFFAA"» Você passará a receber um salário de {008000}$2.100,00");
                    
SendClientMessage(playerid0x008080AA"~~~~~~~~~~~~~~~~~~~~~~~ Polícia Militar ~~~~~~~~~~~~~~~~~~~~~~~");

                    
PlayerInfoplayerid ][ pProfissao ] = PMilitar;
                    
SetarProfissao(playerid);
                }
                else
                {
                    
SendClientMessage(playerid0xFF0000AA"| ERRO | Você não tem level suficiente para pegar esta Profissão!");
                }
            }
            if(
listitem == 1)
            {
                if(
GetPlayerScore(playerid) >= 200)
                {
                    
SendClientMessage(playerid0x008080AA"~~~~~~~~~~~~~~~~~~~~~~~ Interpol ~~~~~~~~~~~~~~~~~~~~~~~");
                    
SendClientMessage(playerid0xFFFFFFAA"» Seu curriculo foi aceito nesta Profissão!");
                    
SendClientMessage(playerid0xFFFFFFAA"» Agora você é da Polícia Interpol!");
                    
SendClientMessage(playerid0xFFFFFFAA"» Você passará a receber um salário de {008000}$2.500,00");
                    
SendClientMessage(playerid0x008080AA"~~~~~~~~~~~~~~~~~~~~~~~ Interpol ~~~~~~~~~~~~~~~~~~~~~~~");

                    
PlayerInfoplayerid ][ pProfissao ] = Interpol;
                    
SetarProfissao(playerid);
                }
                else
                {
                    
SendClientMessage(playerid0xFF0000AA"| ERRO | Você não tem level suficiente para pegar esta Profissão!");
                }
            }
        }
        else
        {
            
ShowPlayerDialog(playeridMenuAgenciaDIALOG_STYLE_LIST"Agência de Empregos""Honestas\nTransporte\nPolicia\nForças Armadas""Selecionar""Fechar");
        }
    }
    if(
dialogid == ForcasArmadas)
    {
        if(
response)
        {
            if(
listitem == 0)
            {
                if(
GetPlayerScore(playerid) >= 700)
                {
                    
SendClientMessage(playerid0x008080AA"~~~~~~~~~~~~~~~~~~~~~~~ Exército ~~~~~~~~~~~~~~~~~~~~~~~");
                    
SendClientMessage(playerid0xFFFFFFAA"» Seu curriculo foi aceito nesta Profissão!");
                    
SendClientMessage(playerid0xFFFFFFAA"» Agora você é do Exército!");
                    
SendClientMessage(playerid0xFFFFFFAA"» Você passará a receber um salário de {008000}$3.000,00");
                    
SendClientMessage(playerid0x008080AA"~~~~~~~~~~~~~~~~~~~~~~~ Exército ~~~~~~~~~~~~~~~~~~~~~~~");

                    
PlayerInfoplayerid ][ pProfissao ] = Exercito;
                    
SetarProfissao(playerid);
                }
                else
                {
                    
SendClientMessage(playerid0xFF0000AA"| ERRO | Você não tem level suficiente para pegar esta Profissão!");
                }
            }
            if(
listitem == 1)
            {
                if(
GetPlayerScore(playerid) >= 800)
                {
                    
SendClientMessage(playerid0x008080AA"~~~~~~~~~~~~~~~~~~~~~~~ Aéronautica ~~~~~~~~~~~~~~~~~~~~~~~");
                    
SendClientMessage(playerid0xFFFFFFAA"» Seu curriculo foi aceito nesta Profissão!");
                    
SendClientMessage(playerid0xFFFFFFAA"» Agora você é da Aéronautica!");
                    
SendClientMessage(playerid0xFFFFFFAA"» Você passará a receber um salário de {008000}$3.500,00");
                    
SendClientMessage(playerid0x008080AA"~~~~~~~~~~~~~~~~~~~~~~~ Aéronautica ~~~~~~~~~~~~~~~~~~~~~~~");

                    
PlayerInfoplayerid ][ pProfissao ] = Aeronautica;
                    
SetarProfissao(playerid);
                }
                else
                {
                    
SendClientMessage(playerid0xFF0000AA"| ERRO | Você não tem level suficiente para pegar esta Profissão!");
                }
            }
        }
        else
        {
            
ShowPlayerDialog(playeridMenuAgenciaDIALOG_STYLE_LIST"Agência de Empregos""Honestas\nTransporte\nPolicia\nForças Armadas""Selecionar""Fechar");
        }

    if(
dialogid == DIALOG_BANCO) {
        switch(
listitem) {
            case 
0: { // Saldo
                
if(response) {
                    new 
aname[MAX_PLAYER_NAME], file[80], string[200], HoraMinutoSegundoDiaMesAno;
                    
gettime(HoraMinutoSegundo);
                    
getdate(AnoMesDia);
                    
GetPlayerName(playeridanamesizeof(aname));
                    
format(filesizeof(file),LocalContasaname);
                    
format(stringsizeof(string), "{FFFFFF}Banco {0fbefe}Cidade Vida Real\n\n\n{FFFFFF}Saldo em Conta {2fcc38}$%d \n\n{FFFFFF}Hora: {8de990}%02d:%02d:%02d \n\n{FFFFFF}Data: {8de990}%02d/%02d/%d"DOF2_GetInt(file"Saldo"), HoraMinutoSegundoDiaMesAno);
                    
ShowPlayerDialog(playeridDIALOG_BANCO_SALDODIALOG_STYLE_MSGBOX"{FFFFFF}Extrato"string"Sair""");
                    return 
1;
                }
            }
            case 
1: { //Saque
                
if(response) {
                    
ShowPlayerDialog(playeridDIALOG_BANCO_SAQUEDIALOG_STYLE_INPUT"{2fca38}Saque""{FFFFFF}Digite a quantia em que você quer sacar""Sacar""Cancelar");
                }
            }
            case 
2: { //Deposito
                
if(response) {
                    
ShowPlayerDialog(playeridDIALOG_BANCO_DEPOSITODIALOG_STYLE_INPUT"{2fca38}Deposito""{FFFFFF}Digite a quantia em que você quer depositar""Depositar""Cancelar");
                }
            }
        }
        return 
1;
    }
    if(
dialogid == DIALOG_BANCO_SAQUE) {
        if(
response) {
            new 
aname[MAX_PLAYER_NAME], file[80], string[250], HoraMinutoSegundoDiaMesAno;
            
gettime(HoraMinutoSegundo);
            
getdate(AnoMesDia);
            
GetPlayerName(playeridanamesizeof(aname));
            
format(filesizeof(file), LocalContasaname);
            if(
strval(inputtext) == 0) return SendClientMessage(playerid, -1"[x] {FF0000}Você tentou sacar 0 R$ de sua conta!");
            if(
strval(inputtext) > DOF2_GetInt(file"Saldo")) return SendClientMessage(playerid, -1"[x] {FF0000}Você não possui saldo suficiente para saque desta quantia!");
            
GivePlayerMoney(playeridstrval(inputtext));
            
DOF2_SetInt(file"Saldo", (DOF2_GetInt(file"Saldo")-strval(inputtext)));
            
DOF2_SaveFile();
            
format(stringsizeof(string), "{FFFFFF}Banco {0fbefe}Cidade Vida Real\n\n\n{FFFFFF}Você sacou {2fcc38}$%d \n\n{FFFFFF}Saldo em Conta {2fcc38}$%d \n\n{FFFFFF}Hora: {8de990}%02d:%02d:%02d \n\n{FFFFFF}Data: {8de990}%02d/%02d/%d"strval(inputtext), DOF2_GetInt(file"Saldo"), HoraMinutoSegundoDiaMesAno);
            
ShowPlayerDialog(playeridDIALOG_BANCO_SALDODIALOG_STYLE_MSGBOX"{FFFFFF}Saque"string"Sair""");
            return 
1;
        }
        return 
1;
    }
    if(
dialogid == DIALOG_BANCO_DEPOSITO) {
        if(
response) {
            new 
aname[MAX_PLAYER_NAME], file[80], string[250], HoraMinutoSegundoDiaMesAno;
            
gettime(HoraMinutoSegundo);
            
getdate(AnoMesDia);
            
GetPlayerName(playeridanamesizeof(aname));
            
format(filesizeof(file), LocalContasaname);
            if(
strval(inputtext) == 0) return SendClientMessage(playerid, -1"[x] {FF0000}Você tentou depositar 0 R$ em sua conta!");
            if(
strval(inputtext) > GetPlayerMoney(playerid)) return SendClientMessage(playerid, -1"[x] {FF0000}Você não possui está quantia em mãos para depositar!");
            
GivePlayerMoney(playerid, -strval(inputtext));
            
DOF2_SetInt(file"Saldo", (DOF2_GetInt(file"Saldo")+strval(inputtext)));
            
DOF2_SaveFile();
            
format(stringsizeof(string), "{FFFFFF}Banco {0fbefe}Cidade Vida Real\n\n\n{FFFFFF}Você depositou {2fcc38}$%d \n\n{FFFFFF}Saldo em Conta {2fcc38}$%d \n\n{FFFFFF}Hora: {8de990}%02d:%02d:%02d \n\n{FFFFFF}Data: {8de990}%02d/%02d/%d"strval(inputtext), DOF2_GetInt(file"Saldo"), HoraMinutoSegundoDiaMesAno);
            
ShowPlayerDialog(playeridDIALOG_BANCO_SALDODIALOG_STYLE_MSGBOX"{FFFFFF}Deposito"string"Sair""");
            return 
1;
        }
        return 
1;
    }


    }
    return 
1;



Erros:

PHP Code:

C:\Users\Helder-PC\Desktop\gmtestes\gamemodes\PS.pwn(557) : warning 219local variable "string" shadows a variable at a preceding level
C
:\Users\Helder-PC\Desktop\gmtestes\gamemodes\PS.pwn(557) : warning 219local variable "File" shadows a variable at a preceding level
C
:\Users\Helder-PC\Desktop\gmtestes\gamemodes\PS.pwn(810) : warning 217loose indentation
C
:\Users\Helder-PC\Desktop\gmtestes\gamemodes\PS.pwn(814) : warning 219local variable "string" shadows a variable at a preceding level
C
:\Users\Helder-PC\Desktop\gmtestes\gamemodes\PS.pwn(839) : warning 219local variable "string" shadows a variable at a preceding level
C
:\Users\Helder-PC\Desktop\gmtestes\gamemodes\PS.pwn(857) : warning 219local variable "string" shadows a variable at a preceding level 


[Ajuda] Compilar no Sublime Text 3

$
0
0
Olá pessoal, estou com uma dúvida. Eu vi em um tutorial de como usar o Sublime Text como se fosse o Pawno, mas seguei em uma parte que fiquei com dúvida, no tutorial ele fala para fazer isso:

• Compilando:
Vá em Tools > Build System > New Build System.
Na aba que aparecer digite o seguinte código:
Code:

Code:
{
        "cmd": ["CAMINHO_PARA_PAWNCC", "-i include", "$file", "-;+"],
        "path": "CAMINHO_PARA_DIRETÓRIO_DO_PAWNCC"
}

  • Agora salve e nomeie o arquivo como Pawn.
  • Volte a aba Tools > Build System > e clique em Pawn.
  • Pronto!
  • OBS: Altere o caminho para o compilador.

Mas eu não entendi essa parte de mudar o caminho, eu tenho que colocar isso aqui nos dois? "C:\Users\Gasparzinho\Downloads\samp03DL_svr_R1_wi n32\pawno"
Se alguém puder me ajudar eu agradeço.

y_unique

$
0
0
Hello, could anyone help me?

I'm trying to compile my gamemode and see this error.

Sorry for the inconvenience. I'm using g00gle translator

PHP Code:

pawno\include\YSI\..\YSI_Coding\..\YSI_Internal\y_unique.inc(103) : error 010invalid function or declaration 

My pizza boy job

Infinite loop...

$
0
0
Hello, so I'm having some trouble trying to fix this, and finally I have ran out of ideas.

So I got this loop:

PHP Code:

new random INVALID_PLAYER_ID;
    do{
        
random Iter_Random(Player);// I use foreach include (pick a random player).
    
}while(!IsLoggedIn[random] || IsJailed[random] == || IsAFK[random] == 1); 

I have checks, so if people disconnect and players reach 0, it won't start, the problem comes when someone disconnects while the loop is running, and Player counter reaches 0, then the loop will go forever and freeze the server. I have tried this:

PHP Code:

new random INVALID_PLAYER_IDcounter 0;
    do{
        
random Iter_Random(Player);
    
counter++;
    }while(!
IsLoggedIn[random] || IsJailed[random] == || IsAFK[random] == || counter 30);//to try and stop it, but still freezes the server. 

I have tried checking player counter while in the loop, but nothing.

Any ideas? Thank you.

[Off] 526 TERABYTES de encription

$
0
0
porque isso tudo aqui é criptografado, deveria ser um assunto dramaticamente popular,
mas é tudo criptografado com 526 TERABYTES de encription

pra ninguém entender o que é trivial
Viewing all 18226 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>