SA-MP Forums Archive
[Ajuda] Sistema anti-DB - 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] Sistema anti-DB (/showthread.php?tid=358180)



Sistema anti-DB - [XPG]MarlonCS - 09.07.2012

Seguinte, o sistema abaixo mostra corretamente quando ocorre um DB, porйm, ele mostra tambйm quando o player mata o outro player do carro/moto. Queria que mostrasse apenas quando o player atropelar.
Й possнvel?

Код:
new killername[MAX_PLAYER_NAME], namemorto[MAX_PLAYER_NAME];
if(killerid != INVALID_PLAYER_ID)
{
if(GetPlayerState(killerid) == 2 || GetPlayerState(killerid) == 3)
{
    GetPlayerName(killerid, killername, MAX_PLAYER_NAME);
    GetPlayerName(playerid, namemorto, MAX_PLAYER_NAME);
    GivePlayerMoney(killerid, -100);
    SendClientMessage(killerid, COLOR_RED, "[SERVER] Nгo abuse de de Drive By (Atropelamento)");
    format(string, sizeof(string), "[SERVER] %s fez Drive By (DB) em %s !", killername,namemorto);
    SendClientMessageToAll(0xFF8821FF, string);
    GameTextForPlayer(playerid,"~r~Atropelado!",5000,3);
}



Re: Sistema anti-DB - @Riichard - 09.07.2012

Pelo oque eu entendi..
Acho que й OnPlayerTakeDamage ou OnPlayerGiveDamage.

Nгo sei bem..


Re: Sistema anti-DB - Miqueias Barros - 09.07.2012

ai manolo, ver se isso pode te ajudar

https://sampforum.blast.hk/showthread.php?tid=182094

https://sampforum.blast.hk/showthread.php?tid=294197


Re: Sistema anti-DB - andmeida10 - 09.07.2012

pawn Код:
if(reason == 49)//https://sampwiki.blast.hk/wiki/Weapons
{
SendClientMessage(playerid, -1, "Vocк foi atropelado");
}