05.01.2012, 08:51
So,i've maked this code to reward the player that kill another player with blade and gets 2500$ as bonus:
But when i compile i get tons of general errors.
What's wrong?
P.S. I placed this in OnPlayerDeath.
pawn Код:
if (GetPlayerState(killerid) == PLAYER_STATE_DRIVER)
{
switch(GetVehicleModel(GetPlayerVehicleID(killerid)))
{
if (killerid != INVALID_PLAYER_ID)
{
switch (reason)
{
case 417, 425, 447, 465, 469, 487, 488, 497, 501, 548, 563: reasonMsg = "Helicopter Blades";
default: reasonMsg = "Vehicle Collision";
SendClientMessage(killerid,COLOR_GREEN,"**You got 2500$ bonus for killing with helicopter blades!");
GivePlayerMoney(killerid, 2500);
}
}
}
}
What's wrong?
P.S. I placed this in OnPlayerDeath.