Wasted levels.. +1 rep

Hi,how i can a player wasted level? and i can add hot keys. For example if a player is a shop and press "y" button then he will earn 200$ and he will take 2 wasted levels. If you help me i will give +1 rep

Thanks for reading

You mean wanted levels? SA-MP Wiki is your friend
As for the buttons: Simple search can bring miracles

pawn Code:
GivePlayerMoney(playerid, 200); //Gives the player 200$
SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) + 2); //Gets the player's wanted level then adds to it
pawn Code:
//Definition is from SA-MP wiki
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
        //your code here
    return 1;
Well that's in my script, just edit it to your liking.

use if (newkeys == KEY_YES) only in 0.3d for the key y.do what the @DBan said above

Forum Jump:

Users browsing this thread: 1 Guest(s)