Need help
#1

I'd really appreciate if you help me with this. I want you to script this: if you are near a door then you can click F or Enter to enter the door.
Reply
#2

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == KEY)
    {
        //code here
        return 1;
    }
    return 1;
}
Find keys here: https://sampwiki.blast.hk/wiki/Keys

And use the "Macro", example: KEY_ACTION
Reply
#3

The problem is that i don't have any clue what the code should be.
Reply
#4

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 2.0, X, Y, Z)) // This X, Y, Z being where the door position is
{
    SetPlayerInterior(playerid, interior);
    SetPlayerPos(playerid, X, Y, Z); // This X, Y, Z being the interior
    return 1;
}
Reply
#5

Unable to compile it. This is the errors: http://prntscr.com/3vmrko
Reply
#6

I also want help with one thing more, its a cmd that i've done, and i need some help with it. its /playcasino [amount of cash you want to play with] and then it decides random who will win, and then you get double amount of money of what u played with.
Reply


Forum Jump:


Users browsing this thread: