Help With OnVehicleDeath!!
#1

When I try this, the killerid returns me to playerid

pawn Код:
#include a_samp
#include y_foreach

public OnVehicleDeath(vehicleid, killerid)
{
if (killerid != INVALID_PLAYER_ID)
{
    foreach(new i: Player)
    {
        if(GetPlayerVehicleID(i) == vehicleid && GetPlayerVehicleSeat(i) == 0)
        {
           Datos[killerid][pKillVeh]+= 1;
           Datos[i][pMuertes]+= 1;
           break;
        }
    }
}
return 1;
}
solution?
Reply
#2

What's the problem exactly? I can't understand what you mean by "the killerid returns me to playerid".
Reply
#3

Quote:
Originally Posted by PaulCrouseVS
Посмотреть сообщение
solution?
Read the wiki...

Quote:

killerid The ID of the player that reported (synced) the vehicle's destruction (name is misleading). Generally the driver or a passenger (if any) or the closest player.

This is the same as the OnVehicleDamageStatusUpdate where it's the person who is updating to the server, that is the reporter.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)