SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 26/05/2020, 10:48 PM   #11
Grim_
High-roller
 
Grim_'s Avatar
 
Join Date: Sep 2008
Location: United States
Posts: 2,897
Reputation: 118
Default Re: Lock/Unlock OnPlayerKeyStateChange

You need to put the code in the callback..
pawn Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_JUMP)
    {
        if (MegaJump[playerid] == 1)
        {
            new Float:Jump[3];
            GetPlayerVelocity(playerid, Jump[0], Jump[1], Jump[2]);
            SetPlayerVelocity(playerid, Jump[0], Jump[1], Jump[2]+5);
            return 1;
        }
    }
        // lock-unlock code
    return 1;
}
Grim_ is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help in /lock and /unlock 123bob123 Server Support 1 17/07/2014 03:39 PM
Lock&Unlock bug [+REP] Jaber_Brown Scripting Help 5 15/03/2012 06:25 PM
Car lock/unlock known Help Archive 1 04/11/2010 10:24 AM
lock car and unlock help Kar Help Archive 10 22/06/2010 06:55 PM
[FilterScript] [FS] /lock and /unlock with automatic unlock timer Christian R. Filterscripts 4 26/10/2009 11:38 PM


All times are GMT. The time now is 08:56 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.