Fine Wanted Level
#6

Quote:
Originally Posted by b3nz
Посмотреть сообщение
You don't really need to check every single wanted level. You can do it this way:

pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if (pickupid == pickup1 || pickupid == pickup2 || pickupid == pickup3)
    {
        new szMessage [57 + 1];
       
        format (szMessage, 57, "You've cleaned your stars! %d was taken from your pocket.", GetPlayerWantedLevel (playerid) * 1000);
        SendClientMessage (playerid, COLOR_WHITE, szMessage);
       
        GivePlayerMoney (playerid, GetPlayerMoney (playerid) - (GetPlayerWantedLevel (playerid) * 1000));
        SetPlayerWantedLevel (playerid, 0);
    }
   
    return (true);
}
Also, you can check things like that:

pawn Код:
if (pickupid == pickup1, pickup2, pickup3)
You must do it this way:

pawn Код:
if (pickupid == pickup1 || pickupid == pickup2 || pickupid == pickup3)
This Works Thank You !!
Reply


Messages In This Thread
Fine Wanted Level - by Playr - 14.06.2015, 12:38
Re: Fine Wanted Level - by J0sh... - 14.06.2015, 12:49
Re: Fine Wanted Level - by Playr - 14.06.2015, 13:00
Re: Fine Wanted Level - by J0sh... - 14.06.2015, 13:05
Re: Fine Wanted Level - by b3nz - 14.06.2015, 13:16
Re: Fine Wanted Level - by Playr - 14.06.2015, 13:42

Forum Jump:


Users browsing this thread: 2 Guest(s)