[Ajuda] Sistema anti-DB
#1

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);
}
Reply
#2

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

Nгo sei bem..
Reply
#3

ai manolo, ver se isso pode te ajudar

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

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)