Wasted levels.. +1 rep
#1

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
Reply
#2

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

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

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (PRESSED(KEY_LOOK_BEHIND))
    {
        //your code here
    }
    return 1;
}
Well that's in my script, just edit it to your liking.
Reply
#3

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


Forum Jump:


Users browsing this thread: 1 Guest(s)