[question / help] +1 Score for murder with a fighter / tank / apache
#1

hello
the problem is this: I need to when the player sitting in the fighter, tank or Apache and he somebody killed him (shot) that the murderer gave +1 Score
nothing I can not do
off site also do not know
help)
Reply
#2

UP
Reply
#3

do u want to give +1 score to person sitting in tank or the person who killed him?
Reply
#4

Quote:
Originally Posted by BroZeus
Посмотреть сообщение
do u want to give +1 score to person sitting in tank or the person who killed him?
No! Look at this: you're sitting in the tank, the other player so zhe.Ty shoot him - he dies, and they give you one point, and the deceased -1
Reply
#5

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{

    if(killerid != INVALID_PLAYER_ID)
    {
        switch(GetPlayerVehicleID(killerid))
        {

            // Rhino and Hunter
            case 425, 432:
            {
                SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
                SetPlayerScore(playerid, GetPlayerScore(playerid) - 1);
            }
        }
    }

    return 1;
}
Reply
#6

does not work((
Reply
#7

It's an example of how it could be, make it yourself using my example.
Reply
#8

there may be other relevant options?
Reply
#9

UP!!!
Reply
#10

Quote:
Originally Posted by Mionee
Посмотреть сообщение
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{

    if(killerid != INVALID_PLAYER_ID)
    {
        switch(GetPlayerVehicleID(killerid))
        {

            // Rhino and Hunter
            case 425, 432:
            {
                SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
                SetPlayerScore(playerid, GetPlayerScore(playerid) - 1);
            }
        }
    }

    return 1;
}
You need to get the vehicle's model ID so it should be:
pawn Код:
switch(GetVehicleModel(GetPlayerVehicleID(killerid)))
Note that it sometimes make the player dies from explosion and the killer is invalid (so it will fail there).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)