Score vehicle killer
#4

Quote:
Originally Posted by Adil
Посмотреть сообщение
pawn Код:
public OnVehicleDeath(vehicleid, killerid)
{
    for(new i=0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerInVehicle(i, vehicleid))
        {
            SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
        }
    }
    return 1;
}
Thanks! i have been looking for this like 100 years,
But it would be much better if you get the score when vehicle health is like 150-200 so you dont need to shoot all the time until vehicle blows, bc i was testing this, if you stop shoot when healt is like 300, you dont get any score when it blows.

And one more question, when you kill ur self, why does ID 0 gets the score? and then i dont mean just this code,
i use this
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    SendDeathMessage(killerid, playerid, reason);
    if(killerid != INVALID_PLAYER_ID) SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
    return 1;
}
Reply


Messages In This Thread
Score vehicle killer - by cruising - 15.07.2011, 10:05
Re: Score vehicle killer - by Miguel - 15.07.2011, 23:29
Re: Score vehicle killer - by Adil - 15.07.2011, 23:47
Re: Score vehicle killer - by cruising - 16.07.2011, 15:06

Forum Jump:


Users browsing this thread: 1 Guest(s)