OK,WHAT'S the problem now?
#2

Well I don't know what the problem is, but I do know this works:

pawn Код:
#include <a_samp>
#define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))

stock ToggleEngine(playerid){
    new engine, lights, alarm, doors, bonnet, boot, objective, vid;
    if(IsPlayerInAnyVehicle(playerid)){
        vid = GetPlayerVehicleID(playerid);
    }
    GetVehicleParamsEx(vid, engine, lights, alarm, doors, bonnet, boot, objective);
    if(engine){
        engine = false;
    }
    else{
        engine = true;
    }
    SetVehicleParamsEx(vid, engine, lights, alarm, doors, bonnet, boot, objective);
    return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){
    if (PRESSED( KEY_SUBMISSION )){
        ToggleEngine(playerid);
        return 1;
    }
    return 1;
}
Reply


Messages In This Thread
OK,WHAT'S the problem now? - by Cjgogo - 24.04.2011, 14:27
Re: OK,WHAT'S the problem now? - by Anteino - 24.04.2011, 14:35
Re: OK,WHAT'S the problem now? - by Joshua_Einstein - 24.04.2011, 14:40

Forum Jump:


Users browsing this thread: 1 Guest(s)