SA-MP Forums Archive
[Ajuda] Nivel de procura - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Nivel de procura (/showthread.php?tid=540113)



Nivel de procura - PraqueNome - 02.10.2014

quando o player joga no servidor com um tempo de jogo o nivel de procura sobe sуzinho, e o policial tambem ta pegando nivel de procurado e gostaria de colocar pra cop n recerber nivel de nenhum geito eu nao consigo achar esse erro mais creio q pode ser aki me ajude.

PHP код:
public SetPlayerCriminal(playerid,declare,reason[])
{
    if(
IsPlayerConnected(playerid) && !IsACop(playerid))
    {
        if(
WantedPoints[playerid] < 6WantedPoints[playerid] += 1;
        
PlayerInfo[playerid][pCrimes] += 1;
        new 
turned[MAX_PLAYER_NAME];
        new 
turner[MAX_PLAYER_NAME];
        new 
location[MAX_ZONE_NAME];
        
GetPlayer2DZone(playeridlocationMAX_ZONE_NAME);
        
strmid(PlayerCrime[playerid][pAccusedof], reason0strlen(reason), 255);
        
GetPlayerName(playeridturnedsizeof(turned));
        if (declare == 
255)
        {
            
format(turnersizeof(turner), "Cвmeras de Seguranзa");
            
strmid(PlayerCrime[playerid][pVictim], turner0strlen(turner), 255);
        }
        else
        {
            if(
IsPlayerConnected(declare))
            {
                
GetPlayerName(declare, turnersizeof(turner));
                
strmid(PlayerCrime[playerid][pVictim], turner0strlen(turner), 255);
                
strmid(PlayerCrime[declare][pBplayer], turned0strlen(turned), 255);
                
strmid(PlayerCrime[declare][pAccusing], reason0strlen(reason), 255);
            }
        }
        
format(gstringsizeof(gstring), "Vocк cometeu um crime ( %s  ). Relato: %s",reason,turner);
        
SendClientMessage(playerid0xFF4800FFgstring);
        
SetPlayerWantedLevel(playeridWantedPoints[playerid]);
        
format(gstringsizeof(gstring), "Nнvel de procurado:{00EAEA} %d"WantedPoints[playerid]);
        
SendClientMessage(playerid0xFEBF01FFgstring);
        
//ProcuradoPlayer(playerid);
  
for(new 0MaiorIDi++)
        {
            if(
IsPlayerConnected(i))
            {
                if(
IsACop(i) && admtrampando[i] != 1)
                {
                    
format(gstringsizeof(gstring), "HQ - Todas as unidades: Relato:{01E8F3} %s",turner);
                    
SendClientMessage(i0x0476F4FFgstring);
                    
format(gstringsizeof(gstring), "HQ - Crime:{01E8F3} %s{0476F4}, Suspeito:{01E8F3} %s",reason,turned);
                    
SendClientMessage(i0x0476F4FFgstring);
                    if(
GetPlayerInterior(playerid) == 0)
                    {
                        
format(gstringsizeof(gstring), "Local:{01E8F3} %s{0476F4}, Em Interior:{01E8F3} Nгo",location);
                        
SendClientMessage(i0x0476F4FFgstring);
                    }
                    else
                    {
                        
format(gstringsizeof(gstring), "Local:{01E8F3} %s{0476F4}, Em Interior:{01E8F3} Sim",location);
                        
SendClientMessage(i0x0476F4FFgstring);
                    }
                }
            }
        }
    }
//not connected




Re: Nivel de procura - zGuigui2068 - 03.10.2014

Quote:
Originally Posted by PraqueNome
Посмотреть сообщение
quando o player joga no servidor com um tempo de jogo o nivel de procura sobe sуzinho, e o policial tambem ta pegando nivel de procurado e gostaria de colocar pra cop n recerber nivel de nenhum geito eu nao consigo achar esse erro mais creio q pode ser aki me ajude.

PHP код:
public SetPlayerCriminal(playerid,declare,reason[])
{
    if(
IsPlayerConnected(playerid) && !IsACop(playerid))
    {
        if(
WantedPoints[playerid] < 6WantedPoints[playerid] += 1;
        
PlayerInfo[playerid][pCrimes] += 1;
        new 
turned[MAX_PLAYER_NAME];
        new 
turner[MAX_PLAYER_NAME];
        new 
location[MAX_ZONE_NAME];
        
GetPlayer2DZone(playeridlocationMAX_ZONE_NAME);
        
strmid(PlayerCrime[playerid][pAccusedof], reason0strlen(reason), 255);
        
GetPlayerName(playeridturnedsizeof(turned));
        if (declare == 
255)
        {
            
format(turnersizeof(turner), "Cвmeras de Seguranзa");
            
strmid(PlayerCrime[playerid][pVictim], turner0strlen(turner), 255);
        }
        else
        {
            if(
IsPlayerConnected(declare))
            {
                
GetPlayerName(declare, turnersizeof(turner));
                
strmid(PlayerCrime[playerid][pVictim], turner0strlen(turner), 255);
                
strmid(PlayerCrime[declare][pBplayer], turned0strlen(turned), 255);
                
strmid(PlayerCrime[declare][pAccusing], reason0strlen(reason), 255);
            }
        }
        
format(gstringsizeof(gstring), "Vocк cometeu um crime ( %s  ). Relato: %s",reason,turner);
        
SendClientMessage(playerid0xFF4800FFgstring);
        
SetPlayerWantedLevel(playeridWantedPoints[playerid]);
        
format(gstringsizeof(gstring), "Nнvel de procurado:{00EAEA} %d"WantedPoints[playerid]);
        
SendClientMessage(playerid0xFEBF01FFgstring);
        
//ProcuradoPlayer(playerid);
  
for(new 0MaiorIDi++)
        {
            if(
IsPlayerConnected(i))
            {
                if(
IsACop(i) && admtrampando[i] != 1)
                {
                    
format(gstringsizeof(gstring), "HQ - Todas as unidades: Relato:{01E8F3} %s",turner);
                    
SendClientMessage(i0x0476F4FFgstring);
                    
format(gstringsizeof(gstring), "HQ - Crime:{01E8F3} %s{0476F4}, Suspeito:{01E8F3} %s",reason,turned);
                    
SendClientMessage(i0x0476F4FFgstring);
                    if(
GetPlayerInterior(playerid) == 0)
                    {
                        
format(gstringsizeof(gstring), "Local:{01E8F3} %s{0476F4}, Em Interior:{01E8F3} Nгo",location);
                        
SendClientMessage(i0x0476F4FFgstring);
                    }
                    else
                    {
                        
format(gstringsizeof(gstring), "Local:{01E8F3} %s{0476F4}, Em Interior:{01E8F3} Sim",location);
                        
SendClientMessage(i0x0476F4FFgstring);
                    }
                }
            }
        }
    }
//not connected

Cara o meu ta assim olha e nao ta nenhum bug desse, tenta copiar.
Ps:nгo me faзa perguntas kkk eu tmb sou novo nisso.

PHP код:
public SetPlayerCriminal(playerid,declare,reason[])
{
    if(
IsPlayerConnected(playerid) && !IsACop(playerid))
    {
        if(
WantedPoints[playerid] < 6WantedPoints[playerid] += 1;
        
PlayerInfo[playerid][pCrimes] += 1;
        new 
turned[MAX_PLAYER_NAME];
        new 
turner[MAX_PLAYER_NAME];
        new 
location[MAX_ZONE_NAME];
        
GetPlayer2DZone(playeridlocationMAX_ZONE_NAME);
        
strmid(PlayerCrime[playerid][pAccusedof], reason0strlen(reason), 255);
        
GetPlayerName(playeridturnedsizeof(turned));
        if (declare == 
255)
        {
            
format(turnersizeof(turner), "Cвmeras de Seguranзa");
            
strmid(PlayerCrime[playerid][pVictim], turner0strlen(turner), 255);
        }
        else
        {
            if(
IsPlayerConnected(declare))
            {
                
GetPlayerName(declare, turnersizeof(turner));
                
strmid(PlayerCrime[playerid][pVictim], turner0strlen(turner), 255);
                
strmid(PlayerCrime[declare][pBplayer], turned0strlen(turned), 255);
                
strmid(PlayerCrime[declare][pAccusing], reason0strlen(reason), 255);
            }
        }
        
format(gstringsizeof(gstring), "Vocк cometeu um crime ({80F0FF} %s {FF4800}). Relato:{B3FFFF} %s",reason,turner);
        
SendClientMessage(playerid0xFF4800FFgstring);
        
SetPlayerWantedLevel(playeridWantedPoints[playerid]);
        
format(gstringsizeof(gstring), "Nнvel de procurado:{00EAEA} %d"WantedPoints[playerid]);
        
SendClientMessage(playerid0xFEBF01FFgstring);
        
//ProcuradoPlayer(playerid);
  
for(new 0MaiorIDi++)
        {
            if(
IsPlayerConnected(i))
            {
                if(
IsACop(i) && admtrampando[i] != 1)
                {
                    
format(gstringsizeof(gstring), "HQ - Todas as unidades: Relato:{01E8F3} %s",turner);
                    
SendClientMessage(i0x0476F4FFgstring);
                    
format(gstringsizeof(gstring), "HQ - Crime:{01E8F3} %s{0476F4}, Suspeito:{01E8F3} %s",reason,turned);
                    
SendClientMessage(i0x0476F4FFgstring);
                    if(
GetPlayerInterior(playerid) == 0)
                    {
                        
format(gstringsizeof(gstring), "Local:{01E8F3} %s{0476F4}, Em Interior:{01E8F3} Nгo",location);
                        
SendClientMessage(i0x0476F4FFgstring);
                    }
                    else
                    {
                        
format(gstringsizeof(gstring), "Local:{01E8F3} %s{0476F4}, Em Interior:{01E8F3} Sim",location);
                        
SendClientMessage(i0x0476F4FFgstring);
                    }
                }
            }
        }
    }
//not connected

Espero ter tentado ajudar.


Re: Nivel de procura - n0minal - 03.10.2014

@Removido: editarei em breve.


Re: Nivel de procura - PraqueNome - 03.10.2014

Guigui й o mesmo codigo. :/


Re: Nivel de procura - DavidCosta - 03.10.2014

Entгo o erro nгo estб aн, dб uma olhada em todos estes cуdigos:
pawn Код:
SetPlayerCriminal
pawn Код:
WantedPoints



Re: Nivel de procura - PraqueNome - 03.10.2014

WantedPoints й quando algum procurado й morto. acho que isso nao influencia nesse caso


Re: Nivel de procura - PraqueNome - 09.10.2014

Alguem ajuda ?