[FilterScript] WLock v1.0
#5

@NGEN here is what you requested

pawn Code:
#include <a_samp>

#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
   
new PlayerVehLocked[MAX_PLAYERS];
   
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (PRESSED(KEY_ACTION))//TAB KEY
    {
        if (IsPlayerInAnyVehicle(playerid))
        {
          if(PlayerVehLocked[playerid] == 1)
          {
            for(new i = 0; i < MAX_PLAYERS; i++)
            SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i,false,false);
            GameTextForPlayer(playerid, "Unlocked", 5000, 3);
          }
          else if(PlayerVehLocked[playerid] == 0)
          {
            for(new i = 0; i < MAX_PLAYERS; i++)
            SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i,false,true);
            GameTextForPlayer(playerid, "Locked", 5000, 3);
          }
           
        }
    }
    return 1;
}
//Press Tab to lock/unlock
And in his original script there is some bugs you need to press left alt then tab to unlock (will switch windows) because its inside the brackets of lALT ( i used notepad++ to check)
Reply


Messages In This Thread
WLock v1.0 - by Steel_ - 02.08.2014, 16:56
Re: WLock v1.0 - by GShock - 02.08.2014, 16:57
Re: WLock v1.0 - by Steel_ - 02.08.2014, 17:03
Re: WLock v1.0 - by SpikY_ - 02.08.2014, 17:24
Re: WLock v1.0 - by ShinichiKudou - 02.08.2014, 17:41
Re: WLock v1.0 - by Steel_ - 02.08.2014, 17:44
Re: WLock v1.0 - by SpikY_ - 03.08.2014, 10:26
Re: WLock v1.0 - by ShinichiKudou - 03.08.2014, 14:49
Re: WLock v1.0 - by Stinged - 06.08.2014, 22:50
Re: WLock v1.0 - by Iloveimpulse - 09.08.2014, 16:09

Forum Jump:


Users browsing this thread: 1 Guest(s)