Lock&Unlock bug [+REP]
#1

Vehicle doesn't lock, it says "Vehicle Locked" but when i get out, i enter it (Unlocked)

pawn Код:
dcmd_lock(playerid,params[]){
    #pragma unused params
    if(IsPlayerConnected(playerid) && Vehicle[GetPlayerVehicleID(playerid)][IsLocked] == 0){
        if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER){
            for(new i = 0; i <MAX_PLAYERS; i++) { if (i != playerid) { SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1); } }
            GameTextForPlayer(playerid,"~G~Vehicle locked",4000,3);
            new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid,X,Y,Z);
            PlayerPlaySound(playerid,1057,X,Y,Z); Vehicle[GetPlayerVehicleID(playerid)][IsLocked] = 1;
            SetTimerEx("UnlockVehicle",600000,false,"i",GetPlayerVehicleID(playerid)); } }
           
    return true;
}

dcmd_unlock(playerid,params[]){
    #pragma unused params
    if(IsPlayerConnected(playerid) && Vehicle[GetPlayerVehicleID(playerid)][IsLocked] == 1){
        if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
            for(new i = 0; i <MAX_PLAYERS; i++) { SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0); }
            GameTextForPlayer(playerid,"~G~Vehicle unlocked",4000,3);
            new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid,X,Y,Z);
            PlayerPlaySound(playerid,1057,X,Y,Z); Vehicle[GetPlayerVehicleID(playerid)][IsLocked] = 0; } }
    return true;
}
Reply


Messages In This Thread
Lock&Unlock bug [+REP] - by Jaber_Brown - 14.03.2012, 21:41
Re: Lock&Unlock bug [+REP] - by StreetGT - 14.03.2012, 21:45
Re : Lock&Unlock bug [+REP] - by Jaber_Brown - 14.03.2012, 22:02
Re: Lock&Unlock bug [+REP] - by StreetGT - 14.03.2012, 22:30
Re : Lock&Unlock bug [+REP] - by Jaber_Brown - 15.03.2012, 13:19
Re : Lock&Unlock bug [+REP] - by Jaber_Brown - 15.03.2012, 18:25

Forum Jump:


Users browsing this thread: 1 Guest(s)