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)