[Ajuda] Drive-By
#1

Olб, achei esse codigo de "Anti Drive-By" aqui no forum, funciona certinho mais quando alguem morre com a explosao da bomba do hydra й kickado, alguem pode conserta-lo? e se nao for pedir muito, ser kickado ao matar com o "negуcio"(nao sei o nome correto) do helicуptero.

pawn Код:
if(IsPlayerInAnyVehicle(killerid))
    {
        if(GetVehicleModel(GetPlayerVehicleID(killerid)) != 425 || GetVehicleModel(GetPlayerVehicleID(killerid)) != 520)
        {
            SendClientMessage(playerid, "Voce cometeu DB e foi kickado");
            Kick(killerid);
        }
    }
Reply
#2

pawn Код:
if(IsPlayerInAnyVehicle(killerid))
    {
        if(GetVehicleModel(GetPlayerVehicleID(killerid)) < 425 || GetVehicleModel(GetPlayerVehicleID(killerid)) > 520 || GetVehicleModel(GetPlayerVehicleID(killerid)) >= 426 || GetVehicleModel(GetPlayerVehicleID(killerid)) =< 519)
        {
            SendClientMessage(playerid, "Voce cometeu DB e foi kickado");
            Kick(killerid);
        }
    }
Tente por isso ^^
Reply
#3

pawn Код:
C:\Documents and Settings\Luciano\Desktop\GAMEMODE\gamemodes\LSTDM.pwn(937) : warning 211: possibly unintended assignment
C:\Documents and Settings\Luciano\Desktop\GAMEMODE\gamemodes\LSTDM.pwn(937) : error 022: must be lvalue (non-constant)
C:\Documents and Settings\Luciano\Desktop\GAMEMODE\gamemodes\LSTDM.pwn(937) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luciano\Desktop\GAMEMODE\gamemodes\LSTDM.pwn(937) : warning 215: expression has no effect
C:\Documents and Settings\Luciano\Desktop\GAMEMODE\gamemodes\LSTDM.pwn(937) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Luciano\Desktop\GAMEMODE\gamemodes\LSTDM.pwn(937) : fatal error 107: too many error messages on one line
Linha:
pawn Код:
if(GetVehicleModel(GetPlayerVehicleID(killerid)) < 425 || GetVehicleModel(GetPlayerVehicleID(killerid)) > 520 || GetVehicleModel(GetPlayerVehicleID(killerid)) >= 426 || GetVehicleModel(GetPlayerVehicleID(killerid)) =< 519)
Reply
#4

Quote:
Originally Posted by .FuneraL.
Посмотреть сообщение
pawn Код:
if(IsPlayerInAnyVehicle(killerid))
    {
        if(GetVehicleModel(GetPlayerVehicleID(killerid)) < 425 || GetVehicleModel(GetPlayerVehicleID(killerid)) > 520 || GetVehicleModel(GetPlayerVehicleID(killerid)) >= 426 || GetVehicleModel(GetPlayerVehicleID(killerid)) =< 519)
        {
            SendClientMessage(playerid, "Voce cometeu DB e foi kickado");
            Kick(killerid);
        }
    }
Tente por isso ^^


nem vo comentar....
Reply
#5

Quote:
Originally Posted by Lucas_Alemao
Посмотреть сообщение


nem vo comentar....
Vocк Jб Comento :P
Reply
#6

Alguem que saiba conserta-lo?
Reply
#7

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(IsPlayerInAnyVehicle(killerid))
    {
        switch(GetVehicleModel(GetPlayerVehicleID(killerid)))
        {
            case /*veiculos de guerra*/:
                return false;
            default: {
                SendClientMessage(killerid, -1, "Voce cometeu DB e foi kickado");
                Kick(killerid);
            }
        }
    }
    return true;
}
Pode ser usado reason tambй.
Reply
#8

Quote:
Originally Posted by zbt
Посмотреть сообщение
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(IsPlayerInAnyVehicle(killerid))
    {
        switch(GetVehicleModel(GetPlayerVehicleID(killerid)))
        {
            case /*veiculos de guerra*/:
                return false;
            default: {
                SendClientMessage(killerid, -1, "Voce cometeu DB e foi kickado");
                Kick(killerid);
            }
        }
    }
    return true;
}
Pode ser usado reason tambй.
Perfeito! +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)