SA-MP Forums Archive
[Nгo Funfando]Sistema Simples de 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: [Nгo Funfando]Sistema Simples de Anti-DB (/showthread.php?tid=195051)



[Nгo Funfando]Sistema Simples de Anti-DB - Lucky ® - 01.12.2010

o que tem de errado aki?

1є if = pra ve se kem mato ta dirigindo ql ker veiuclo
2є if = pra ve se kem morreu ta de apй

pawn Код:
if(GetPlayerState(killerid) == PLAYER_STATE_DRIVER)
    {
       if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
        {
         new kickname[MAX_PLAYER_NAME];
         GetPlayerName(killerid,kickname,sizeof(kickname));
         format(string,sizeof(string),"{FF6347}ATENЗГO:[%d]%s cometeu DriveBy em %s e serб kickado pelo {FFFFFF}Darth Vader.",killerid,kickname,name);
         SendClientMessageToAll(COLOR_LIGHTRED,string);
        }
    }



Re: [Nгo Funfando]Sistema Simples de Anti-DB - zSuYaNw - 01.12.2010

pawn Код:
if(IsPlayerInAnyVehicle(killerid)
    {
         new kickname[MAX_PLAYER_NAME];
         GetPlayerName(killerid,kickname,sizeof(kickname));
         format(string,sizeof(string),"{FF6347}ATENЗГO:[%d]%s cometeu DriveBy em %s e serб kickado pelo {FFFFFF}Darth Vader.",killerid,kickname,name);
         SendClientMessageToAll(COLOR_LIGHTRED,string);
    }



Re: [Nгo Funfando]Sistema Simples de Anti-DB - blackwave - 01.12.2010

Код:
public OnVehicleDeath(vehicleid, killerid)
{
	if(reason == 49 && IsPlayerInVehicle(killerid) && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
        new kickname[MAX_PLAYER_NAME];
         GetPlayerName(killerid,kickname,sizeof(kickname));
         format(string,sizeof(string),"{FF6347}ATENЗГO:[%d]%s cometeu DriveBy em %s e serб kickado pelo   {FFFFFF}Darth Vader.",killerid,kickname,name);
         SendClientMessageToAll(COLOR_LIGHTRED,string);
   
}
Coloquei msg por reason de morte, para cada morte, e separadamente de killerid invalido ou nao. Uso assim como ta no codigo pra DB


Re: [Nгo Funfando]Sistema Simples de Anti-DB - Lucky ® - 01.12.2010

gente eu quero ke so seja db se for Moto,carro x Pedestre

nao Veiculo x Veiculo


Re: [Nгo Funfando]Sistema Simples de Anti-DB - blackwave - 01.12.2010

Quote:
Originally Posted by Lucky ®
Посмотреть сообщение
gente eu quero ke so seja db se for Moto,carro x Pedestre

nao Veiculo x Veiculo
Entгo ue, no OnPlayerDeath: falei que uso assim, e sempre que morre manda a msg: %s foi morto por %s [DB]

reason 49 == Vehicle


Re: [Nгo Funfando]Sistema Simples de Anti-DB - Lucky ® - 01.12.2010

(12045) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

pawn Код:
if(reason == 49 && IsPlayerInVehicle(killerid) && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)



Re: [Nгo Funfando]Sistema Simples de Anti-DB - blackwave - 01.12.2010

So uma warning. Pq nao testa?


Re: [Nгo Funfando]Sistema Simples de Anti-DB - Lucky ® - 01.12.2010

Pq n tгo ninguem pra testar cmg

e number of arguments does not match definition deve ter algo errado na linha , talvez o reason

Mais tarde loga arguem pa testa cum eu *-*


Re: [Nгo Funfando]Sistema Simples de Anti-DB - rjjj - 01.12.2010

Pronto Lucky, arrumei e testei seu cуdigo:


pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(reason == 49 && IsPlayerInAnyVehicle(killerid) && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
    {
        new stringDB[256];
        new kickname[MAX_PLAYER_NAME];
        new morto[MAX_PLAYER_NAME];
        GetPlayerName(playerid,morto,sizeof(morto));
        GetPlayerName(killerid,kickname,sizeof(kickname));
        format(stringDB,sizeof(stringDB),"{FF6347}ATENЗГO:[%d]%s cometeu DriveBy em %s e serб kickado pelo   {FFFFFF}Darth Vader.",killerid,kickname,morto);
        SendClientMessageToAll(0xFF6347AA,stringDB);
    }

}


Espero ter ajudado


Re: [Nгo Funfando]Sistema Simples de Anti-DB - blackwave - 01.12.2010

Quote:
Originally Posted by rjjj
Посмотреть сообщение
Pronto Lucky, arrumei e testei seu cуdigo:


pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(reason == 49 && IsPlayerInAnyVehicle(killerid) && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
    {
        new stringDB[256];
        new kickname[MAX_PLAYER_NAME];
        new morto[MAX_PLAYER_NAME];
        GetPlayerName(playerid,morto,sizeof(morto));
        GetPlayerName(killerid,kickname,sizeof(kickname));
        format(stringDB,sizeof(stringDB),"{FF6347}ATENЗГO:[%d]%s cometeu DriveBy em %s e serб kickado pelo   {FFFFFF}Darth Vader.",killerid,kickname,morto);
        SendClientMessageToAll(0xFF6347AA,stringDB);
    }

}


Espero ter ajudado
msma coisa