[Ajuda] Nivel de procura
#1

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

Reply
#2

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.
Reply
#3

@Removido: editarei em breve.
Reply
#4

Guigui й o mesmo codigo. :/
Reply
#5

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

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

Alguem ajuda ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)