SA-MP Forums Archive
[Pedido] Anti-Drive By - 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: [Pedido] Anti-Drive By (/showthread.php?tid=545976)



Anti-Drive By - Feio - 11.11.2014

Venho Aqui Pedir ajuda pra um Anti-Drive By que o jogador quando matar o player ele vai preso e nгo consegue usar comandos e se sair do jogo quando voltar continua preso , alguem poderia me mandar um Anti-Drive By Usei o Search e o ****** os que eu achei nгo funciona


Re: Anti-Drive By - CLANdok - 12.11.2014

Como dito aqui: https://sampwiki.blast.hk/wiki/OnPlayerDeath_PT

Vocк pode usar INVALID_PLAYER_ID para verificar se o player foi morto por outro player ou nгo, agora a cadeia, vocк pode usar DOF2 ... Tem varios exemplos disto ai no fуrum mano, sу pesquisar !!


Re: Anti-Drive By - Boot - 12.11.2014

Vocк estб pedindo um sistema de jail + sistema de controle de uso de comandos + sistema de salvamento em apenas um tуpico.

Vб devagar, existem outras alternativas que vocк pode utilizar. Veja:

Para matar o jogador que assassinou outro dentro de um veнculo utilizando uma arma:

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid != INVALID_PLAYER_ID) 
    {
    if(IsPlayerInAnyVehicle(killerid)) return SetPlayerHealth(killerid, 0);
    }
    return 1;
}
Se quiser matar o jogador assassino, caso ele esteja como passageiro em um veнculo:

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid != INVALID_PLAYER_ID) 
    {
    if(IsPlayerInAnyVehicle(killerid) && GetPlayerState(killerid) == 3) return SetPlayerHealth(killerid, 0);
    }
    return 1;
}
Se quiser matar o jogador assassino, caso ele esteja como motorista em um veнculo:

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid != INVALID_PLAYER_ID) 
    {
    if(IsPlayerInAnyVehicle(killerid) && GetPlayerState(killerid) == 2) return SetPlayerHealth(killerid, 0);
    }
    return 1;
}
E para matar o jogador assassino, caso o motivo da morte seja por atropelamento:

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid != INVALID_PLAYER_ID) 
    {
    if(reason == 49) return SetPlayerHealth(killerid, 0);
    }
    return 1;
}



Re: Anti-Drive By - Feio - 12.11.2014

Quote:
Originally Posted by CLANdok
Посмотреть сообщение
Como dito aqui: https://sampwiki.blast.hk/wiki/OnPlayerDeath_PT

Vocк pode usar INVALID_PLAYER_ID para verificar se o player foi morto por outro player ou nгo, agora a cadeia, vocк pode usar DOF2 ... Tem varios exemplos disto ai no fуrum mano, sу pesquisar !!
Obrigado .Vou Tentar

Quote:
Originally Posted by Boot
Посмотреть сообщение
Vocк estб pedindo um sistema de jail + sistema de controle de uso de comandos + sistema de salvamento em apenas um tуpico.

Vб devagar, existem outras alternativas que vocк pode utilizar. Veja:

Para matar o jogador que assassinou outro dentro de um veнculo utilizando uma arma:

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid != INVALID_PLAYER_ID) 
    {
    if(IsPlayerInAnyVehicle(killerid)) return SetPlayerHealth(killerid, 0);
    }
    return 1;
}
Se quiser matar o jogador assassino, caso ele esteja como passageiro em um veнculo:

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid != INVALID_PLAYER_ID) 
    {
    if(IsPlayerInAnyVehicle(killerid) && GetPlayerState(killerid) == 3) return SetPlayerHealth(killerid, 0);
    }
    return 1;
}
Se quiser matar o jogador assassino, caso ele esteja como motorista em um veнculo:

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid != INVALID_PLAYER_ID) 
    {
    if(IsPlayerInAnyVehicle(killerid) && GetPlayerState(killerid) == 2) return SetPlayerHealth(killerid, 0);
    }
    return 1;
}
E para matar o jogador assassino, caso o motivo da morte seja por atropelamento:

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid != INVALID_PLAYER_ID) 
    {
    if(reason == 49) return SetPlayerHealth(killerid, 0);
    }
    return 1;
}
Eu nгo to pedindo sistema de jail + sistema de controle de uso de comandos + sistema de salvamento em apenas um tуpico. eu estou querendo um Anti-Drive By que quando o palyer matar com o carro ele vai preso e na prisгo ele nгo consiga usar nenhum comando e se sair quando ele voltar continuar na prisгo


AW: Anti-Drive By - s4kuL - 12.11.2014

Melhor que tem й esse:

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate) {
    if(newstate == PLAYER_STATE_PASSENGER || newstate == PLAYER_STATE_DRIVER) SetPlayerArmedWeapon(playerid, 0);
    return 1;
}
Desarma o cara ao entrar no veнculo e quando sai devolve.


Re: AW: Anti-Drive By - Feio - 27.11.2014

Quote:
Originally Posted by s4kuL
Посмотреть сообщение
Melhor que tem й esse:

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate) {
    if(newstate == PLAYER_STATE_PASSENGER || newstate == PLAYER_STATE_DRIVER) SetPlayerArmedWeapon(playerid, 0);
    return 1;
}
Desarma o cara ao entrar no veнculo e quando sai devolve.
sim esse eu jб tenho mais sу que muitos players pega o carro e estaciona o carro em cima de outro player atй matar , ai eu queria um se o player fizer isso ele vai pra prisгo


Re: Anti-Drive By - Pablo098 - 27.11.2014

Vou criar um tutorial, daqui a pouco posto..


Re: Anti-Drive By - Pablo098 - 27.11.2014

Anti-drive by simples e ъtil