[Ajuda] Bug ou roubar
#1

Estou quebrando a cabeзa tentando conserta esse bug alguem me ajudar pfv
PHP код:
    if(newkeys == KEY_SECONDARY_ATTACK && IsPlayerInRangeOfPoint(playerid5137,2060.8616,10.8445,87.6998)) // Tecla » [ \| ]
    
{
        if(
Player[playerid][pPMRJ] >= || Player[playerid][pBOPE] >= || Player[playerid][pCORE] >= 1)return SendClientMessage(playeridCOR_ERRO"ERRO: Policial nгo rouba banco ;)");
        if(
Player[playerid][pTempoBanco] >= 1)
        {
           
SendFormattedMessage(playeridCOR_ERRO"ERRO: Vocк jб roubou o banco recentemente, espere %s."Convert(Player[playerid][pTempoBanco]));
           return 
1;
        }
        static 
Ladrao[MAX_PLAYER_NAME], sStr[70];
        new 
Float:Pos[3];
        
SetPlayerWantedLevel(playeridGetPlayerWantedLevel(playerid) + 1);
        
Player[playerid][pProcurado] += 1;
        
GetPlayerPos(playeridPos[0], Pos[1], Pos[2]);
        
GetPlayerName(playeridLadraosizeof(Ladrao));
        if(
Roubando[playerid] == 1) return SendClientMessage(playerid0xE31919FF"[~] Vocк jб estб assaltando!");
        
format(sStrsizeof(sStr), "[NOTНCIAS] %s[%d] Plantou uma Bomba no Caixa Eletrуnico!"Ladraoplayerid);
        
SendClientMessageToAll(0xE31919FFsStr);
        
Bomba CreateObject(1252Pos[0], Pos[1], Pos[2] - 0.8,270,0,0);
        
ApplyAnimation(playerid"BOMBER""BOM_Plant"4.000000);
        
format(sStrsizeof(sStr), "Espere no local %d minutos para concluir o saqueamento!"TempoRoubo);
        
SendClientMessage(playerid0xC9C9C9FFsStr);
        
SendClientMessage(playerid0xFF7777AA"Vocк foi feito um procurado da justiзa. | Crime: 157.");
        
SetTimerEx("Roubou"30000*TempoRoubo,false,"d"playerid);
        
Roubando[playerid] = 1;
        new 
city[64] = "Nгo identificado";
        new 
string[100];
        switch(
GetPlayerCity(playerid))
        {
            case 
CITY_LScity "Los Santos";
            case 
CITY_SFcity "San Fierro";
            case 
CITY_LVcity "Las Venturas";
        }
        
format(string,sizeof(string),"HQ{FFFFFF}: Chamando Todas As Ъnidades, Denъncia de {4876FF}Banco.");
        
SendMessageToCops(0xFF0000AAstring);
        
format(string,sizeof(string),"HQ{FFFFFF}: Crime: 157 | Suspeito: %s | Local: %s !"getPName(playerid), city);
        
SendMessageToCops(0xFF0000AAstring);
        
SalvarPlayer(playerid);
        return 
1;
    } 
https://imgur.com/a/UlKrw
Reply
#2

Код:
IsPlayerInRangeOfPoint(playerid, 5137,2060.8616,10.8445,87.6998)
Onde estб em vermelho coloque a distancia que desejas.

Exe:
PHP код:
IsPlayerInRangeOfPoint(playerid30.02060.8616,10.8445,87.6998// exemplo de 30 metros. 
Reply
#3

Quote:
Originally Posted by SammyJ
Посмотреть сообщение
Код:
IsPlayerInRangeOfPoint(playerid, 5137,2060.8616,10.8445,87.6998)
Onde estб em vermelho coloque a distancia que desejas.

Exe:
PHP код:
IsPlayerInRangeOfPoint(playerid30.02060.8616,10.8445,87.6998// exemplo de 30 metros. 
mudei quando chegui no local apertei o enter e f nгo deu pra roubar , da uma olhas nos codigos
https://imgur.com/a/EwpFn

tipo eu queria por para rouba em cada um local desse ai
Reply
#4

Vocк colocou 1 metro talvez nгo й um range grande o bastante coloque pelo menos 3.0, se nгo der vai aumentando.
Reply
#5

Quote:
Originally Posted by SammyJ
Посмотреть сообщение
Vocк colocou 1 metro talvez nгo й um range grande o bastante coloque pelo menos 3.0, se nгo der vai aumentando.
nгo foi continuar a msm coisa https://imgur.com/a/Rl1bZ
Reply
#6

Cola aqui esses cуdigos do AddPlayerClass...

@EDIT

Pela demora, tive que copiar da imagem mesmo...
Tenta aн:

PHP код:

if(newkeys == KEY_SECONDARY_ATTACK// Tecla » [ \| ]
{
    new 
Floatdistance_ 3.0;
    if(
IsPlayerInRangeOfPoint(playeriddistance_2072.51372060.861610.8445) || IsPlayerInRangeOfPoint(playeriddistance_2072.46072059.431410.8445) ||
    
IsPlayerInRangeOfPoint(playeriddistance_2072.82232058.229510.8445) ||  IsPlayerInRangeOfPoint(playeriddistance_2072.65802056.964110.8445) ||
    
IsPlayerInRangeOfPoint(playeriddistance_2072.84792055.671110.8445))
    {
        if(
Player[playerid][pPMRJ] >= || Player[playerid][pBOPE] >= || Player[playerid][pCORE] >= 1)return SendClientMessage(playeridCOR_ERRO"ERRO: Policial nгo rouba banco ;)");
        if(
Player[playerid][pTempoBanco] >= 1)
        {
           
SendFormattedMessage(playeridCOR_ERRO"ERRO: Vocк jб roubou o banco recentemente, espere %s."Convert(Player[playerid][pTempoBanco]));
           return 
1;
        }
        static 
Ladrao[MAX_PLAYER_NAME], sStr[70];
        new 
Float:Pos[3];
        
SetPlayerWantedLevel(playeridGetPlayerWantedLevel(playerid) + 1);
        
Player[playerid][pProcurado] += 1;
        
GetPlayerPos(playeridPos[0], Pos[1], Pos[2]);
        
GetPlayerName(playeridLadraosizeof(Ladrao));
        if(
Roubando[playerid] == 1) return SendClientMessage(playerid0xE31919FF"[~] Vocк jб estб assaltando!");
        
format(sStrsizeof(sStr), "[NOTНCIAS] %s[%d] Plantou uma Bomba no Caixa Eletrуnico!"Ladraoplayerid);
        
SendClientMessageToAll(0xE31919FFsStr);
        
Bomba CreateObject(1252Pos[0], Pos[1], Pos[2] - 0.8,270,0,0);
        
ApplyAnimation(playerid"BOMBER""BOM_Plant"4.000000);
        
format(sStrsizeof(sStr), "Espere no local %d minutos para concluir o saqueamento!"TempoRoubo);
        
SendClientMessage(playerid0xC9C9C9FFsStr);
        
SendClientMessage(playerid0xFF7777AA"Vocк foi feito um procurado da justiзa. | Crime: 157.");
        
SetTimerEx("Roubou"30000*TempoRoubo,false,"d"playerid);
        
Roubando[playerid] = 1;
        new 
city[64] = "Nгo identificado";
        new 
string[100];
        switch(
GetPlayerCity(playerid))
        {
            case 
CITY_LScity "Los Santos";
            case 
CITY_SFcity "San Fierro";
            case 
CITY_LVcity "Las Venturas";
        }
        
format(string,sizeof(string),"HQ{FFFFFF}: Chamando Todas As Ъnidades, Denъncia de {4876FF}Banco.");
        
SendMessageToCops(0xFF0000AAstring);
        
format(string,sizeof(string),"HQ{FFFFFF}: Crime: 157 | Suspeito: %s | Local: %s !"getPName(playerid), city);
        
SendMessageToCops(0xFF0000AAstring);
        
SalvarPlayer(playerid);
    }
    return 
1;

Nгo tentei compilar. Qualquer erro, avise-me.
Reply
#7

Tome cuidado ao verificar uma chave
Код:
if(newkeys & KEY_SECONDARY_ATTACK)
Reply
#8

Quote:
Originally Posted by humildadeforever
Посмотреть сообщение
Cola aqui esses cуdigos do AddPlayerClass...

@EDIT

Pela demora, tive que copiar da imagem mesmo...
Tenta aн:

PHP код:

if(newkeys == KEY_SECONDARY_ATTACK// Tecla » [ \| ]
{
    new 
Floatdistance_ 3.0;
    if(
IsPlayerInRangeOfPoint(playeriddistance_2072.51372060.861610.8445) || IsPlayerInRangeOfPoint(playeriddistance_2072.46072059.431410.8445) ||
    
IsPlayerInRangeOfPoint(playeriddistance_2072.82232058.229510.8445) ||  IsPlayerInRangeOfPoint(playeriddistance_2072.65802056.964110.8445) ||
    
IsPlayerInRangeOfPoint(playeriddistance_2072.84792055.671110.8445))
    {
        if(
Player[playerid][pPMRJ] >= || Player[playerid][pBOPE] >= || Player[playerid][pCORE] >= 1)return SendClientMessage(playeridCOR_ERRO"ERRO: Policial nгo rouba banco ;)");
        if(
Player[playerid][pTempoBanco] >= 1)
        {
           
SendFormattedMessage(playeridCOR_ERRO"ERRO: Vocк jб roubou o banco recentemente, espere %s."Convert(Player[playerid][pTempoBanco]));
           return 
1;
        }
        static 
Ladrao[MAX_PLAYER_NAME], sStr[70];
        new 
Float:Pos[3];
        
SetPlayerWantedLevel(playeridGetPlayerWantedLevel(playerid) + 1);
        
Player[playerid][pProcurado] += 1;
        
GetPlayerPos(playeridPos[0], Pos[1], Pos[2]);
        
GetPlayerName(playeridLadraosizeof(Ladrao));
        if(
Roubando[playerid] == 1) return SendClientMessage(playerid0xE31919FF"[~] Vocк jб estб assaltando!");
        
format(sStrsizeof(sStr), "[NOTНCIAS] %s[%d] Plantou uma Bomba no Caixa Eletrуnico!"Ladraoplayerid);
        
SendClientMessageToAll(0xE31919FFsStr);
        
Bomba CreateObject(1252Pos[0], Pos[1], Pos[2] - 0.8,270,0,0);
        
ApplyAnimation(playerid"BOMBER""BOM_Plant"4.000000);
        
format(sStrsizeof(sStr), "Espere no local %d minutos para concluir o saqueamento!"TempoRoubo);
        
SendClientMessage(playerid0xC9C9C9FFsStr);
        
SendClientMessage(playerid0xFF7777AA"Vocк foi feito um procurado da justiзa. | Crime: 157.");
        
SetTimerEx("Roubou"30000*TempoRoubo,false,"d"playerid);
        
Roubando[playerid] = 1;
        new 
city[64] = "Nгo identificado";
        new 
string[100];
        switch(
GetPlayerCity(playerid))
        {
            case 
CITY_LScity "Los Santos";
            case 
CITY_SFcity "San Fierro";
            case 
CITY_LVcity "Las Venturas";
        }
        
format(string,sizeof(string),"HQ{FFFFFF}: Chamando Todas As Ъnidades, Denъncia de {4876FF}Banco.");
        
SendMessageToCops(0xFF0000AAstring);
        
format(string,sizeof(string),"HQ{FFFFFF}: Crime: 157 | Suspeito: %s | Local: %s !"getPName(playerid), city);
        
SendMessageToCops(0xFF0000AAstring);
        
SalvarPlayer(playerid);
    }
    return 
1;

Nгo tentei compilar. Qualquer erro, avise-me.
PHP код:
    if(newkeys == KEY_SECONDARY_ATTACK// Tecla » [ \| ]
    
{
    new 
Floatdistance_ 0.0;
    if(
IsPlayerInRangeOfPoint(playeriddistance_2072.51372060.861610.8445) || IsPlayerInRangeOfPoint(playeriddistance_2072.4607,2059.4314,10.8445) ||
    
IsPlayerInRangeOfPoint(playeriddistance_2072.8223,2058.2295,10.8445) ||  IsPlayerInRangeOfPoint(playeriddistance_2072.6580,2056.9641,10.8445) ||
    
IsPlayerInRangeOfPoint(playeriddistance_2072.8479,2055.6711,10.8445))
    {
        if(
Player[playerid][pPMRJ] >= || Player[playerid][pBOPE] >= || Player[playerid][pCORE] >= 1)return SendClientMessage(playeridCOR_ERRO"ERRO: Policial nгo rouba banco ;)");
        if(
Player[playerid][pTempoBanco] >= 1)
        {
           
SendFormattedMessage(playeridCOR_ERRO"ERRO: Vocк jб roubou o banco recentemente, espere %s."Convert(Player[playerid][pTempoBanco]));
           return 
1;
        }
        static 
Ladrao[MAX_PLAYER_NAME], sStr[70];
        new 
Float:Pos[3];
        
SetPlayerWantedLevel(playeridGetPlayerWantedLevel(playerid) + 1);
        
Player[playerid][pProcurado] += 1;
        
GetPlayerPos(playeridPos[0], Pos[1], Pos[2]);
        
GetPlayerName(playeridLadraosizeof(Ladrao));
        if(
Roubando[playerid] == 1) return SendClientMessage(playerid0xE31919FF"[~] Vocк jб estб assaltando!");
        
format(sStrsizeof(sStr), "[NOTНCIAS] %s[%d] Plantou uma Bomba no Caixa Eletrуnico!"Ladraoplayerid);
        
SendClientMessageToAll(0xE31919FFsStr);
        
Bomba CreateObject(1252Pos[0], Pos[1], Pos[2] - 0.8,270,0,0);
        
SetPVarFloat(playerid"PosX"Pos[0]);
        
SetPVarFloat(playerid"PosY"Pos[1]);
        
SetPVarFloat(playerid"PosZ"Pos[2]);
        
ApplyAnimation(playerid"BOMBER""BOM_Plant"4.000000);
        
format(sStrsizeof(sStr), "Espere no local %d minutos para concluir o saqueamento!"TempoRoubo);
        
SendClientMessage(playerid0xC9C9C9FFsStr);
        
SendClientMessage(playerid0xFF7777AA"Vocк foi feito um procurado da justiзa. | Crime: 157.");
        
SetTimerEx("Roubou"30000*TempoRoubo,false,"d"playerid);
        
Roubando[playerid] = 1;
        new 
city[64] = "Nгo identificado";
        new 
string[100];
        switch(
GetPlayerCity(playerid))
        {
            case 
CITY_LScity "Los Santos";
            case 
CITY_SFcity "San Fierro";
            case 
CITY_LVcity "Las Venturas";
        }
        
format(string,sizeof(string),"HQ{FFFFFF}: Chamando Todas As Ъnidades, Denъncia de {4876FF}Banco.");
        
SendMessageToCops(0xFF0000AAstring);
        
format(string,sizeof(string),"HQ{FFFFFF}: Crime: 157 | Suspeito: %s | Local: %s !"getPName(playerid), city);
        
SendMessageToCops(0xFF0000AAstring);
        
SalvarPlayer(playerid);
    }
    return 
1;

mudei tudo e nada funcionou agr nem da mas pra roubar oq eu faзo ?
Reply
#9

Quote:
Originally Posted by henrique22157
Посмотреть сообщение
PHP код:
    if(newkeys == KEY_SECONDARY_ATTACK// Tecla » [ \| ]
    
{
    new 
Floatdistance_ 0.0;
    if(
IsPlayerInRangeOfPoint(playeriddistance_2072.51372060.861610.8445) || IsPlayerInRangeOfPoint(playeriddistance_2072.4607,2059.4314,10.8445) ||
    
IsPlayerInRangeOfPoint(playeriddistance_2072.8223,2058.2295,10.8445) ||  IsPlayerInRangeOfPoint(playeriddistance_2072.6580,2056.9641,10.8445) ||
    
IsPlayerInRangeOfPoint(playeriddistance_2072.8479,2055.6711,10.8445))
    {
        if(
Player[playerid][pPMRJ] >= || Player[playerid][pBOPE] >= || Player[playerid][pCORE] >= 1)return SendClientMessage(playeridCOR_ERRO"ERRO: Policial nгo rouba banco ;)");
        if(
Player[playerid][pTempoBanco] >= 1)
        {
           
SendFormattedMessage(playeridCOR_ERRO"ERRO: Vocк jб roubou o banco recentemente, espere %s."Convert(Player[playerid][pTempoBanco]));
           return 
1;
        }
        static 
Ladrao[MAX_PLAYER_NAME], sStr[70];
        new 
Float:Pos[3];
        
SetPlayerWantedLevel(playeridGetPlayerWantedLevel(playerid) + 1);
        
Player[playerid][pProcurado] += 1;
        
GetPlayerPos(playeridPos[0], Pos[1], Pos[2]);
        
GetPlayerName(playeridLadraosizeof(Ladrao));
        if(
Roubando[playerid] == 1) return SendClientMessage(playerid0xE31919FF"[~] Vocк jб estб assaltando!");
        
format(sStrsizeof(sStr), "[NOTНCIAS] %s[%d] Plantou uma Bomba no Caixa Eletrуnico!"Ladraoplayerid);
        
SendClientMessageToAll(0xE31919FFsStr);
        
Bomba CreateObject(1252Pos[0], Pos[1], Pos[2] - 0.8,270,0,0);
        
SetPVarFloat(playerid"PosX"Pos[0]);
        
SetPVarFloat(playerid"PosY"Pos[1]);
        
SetPVarFloat(playerid"PosZ"Pos[2]);
        
ApplyAnimation(playerid"BOMBER""BOM_Plant"4.000000);
        
format(sStrsizeof(sStr), "Espere no local %d minutos para concluir o saqueamento!"TempoRoubo);
        
SendClientMessage(playerid0xC9C9C9FFsStr);
        
SendClientMessage(playerid0xFF7777AA"Vocк foi feito um procurado da justiзa. | Crime: 157.");
        
SetTimerEx("Roubou"30000*TempoRoubo,false,"d"playerid);
        
Roubando[playerid] = 1;
        new 
city[64] = "Nгo identificado";
        new 
string[100];
        switch(
GetPlayerCity(playerid))
        {
            case 
CITY_LScity "Los Santos";
            case 
CITY_SFcity "San Fierro";
            case 
CITY_LVcity "Las Venturas";
        }
        
format(string,sizeof(string),"HQ{FFFFFF}: Chamando Todas As Ъnidades, Denъncia de {4876FF}Banco.");
        
SendMessageToCops(0xFF0000AAstring);
        
format(string,sizeof(string),"HQ{FFFFFF}: Crime: 157 | Suspeito: %s | Local: %s !"getPName(playerid), city);
        
SendMessageToCops(0xFF0000AAstring);
        
SalvarPlayer(playerid);
    }
    return 
1;

mudei tudo e nada funcionou agr nem da mas pra roubar oq eu faзo ?
Por que vocк mudou o distance_ para 0.0? Deixa 3.0
Reply
#10

Quote:
Originally Posted by humildadeforever
Посмотреть сообщение
Por que vocк mudou o distance_ para 0.0? Deixa 3.0
flw funcionou meu mano tmj <3 +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)