WOW! Engine problem - Engine starts with Forward(W) KEY!
#1

So as you can tell from the name of this thread I'm not even mad, I'm amazed
But for real, Engine should start with KEY_SPRINT and instead it starts with undetectable key W (the one to go forward).

I thought it may be my PC doing some strange binding or something, but my friend also tested with his PC.

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  	if(newkeys & KEY_SPRINT)
    {
    	if(IsPlayerInAnyVehicle(playerid))
    	{
			new vehicleid = GetPlayerVehicleID(playerid);
			new engine, lights, alarm, doors, bonnet, boot, objective;
			GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
			if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
			{
			    if(EngineStarting[playerid] == 0){
				if(engine == 0)
				{
   					EngineStarting[playerid] = 1;
    				SetTimerEx("StartEngine", 3000, 0, "i", playerid);
    				SendClientMessage(playerid, COLOR_YELLOW, "Uюvedamas variklis...");
				}
				if(engine == 1)
				{
		    		engine = 0;
		    		SetVehicleParamsEx(vehicleid,0,lights,alarm,doors,bonnet,boot,objective);
					SendActionMessage(playerid,"iрjungл variklб.");
				}
				if(engine == -1)
				{
					SetVehicleParamsEx(vehicleid,0,0,alarm,doors,bonnet,boot,objective);
				}
				}
				else return 0;
    		        }
		}
	}
...
return 1;
}
Код:
public OnPlayerStateChange(playerid, newstate, oldstate) {
    switch(GetPlayerState(playerid)) {
        case PLAYER_STATE_DRIVER: {
            new vehicleid = GetPlayerVehicleID(playerid);
            SendClientMessage(playerid,COLOR_YELLOW,"[VARIKLIS]: "COL_WHITE"Norint uюvesti variklб spausk SHIFT");
            if(EngineBroken[vehicleid] != 1){
            	CheckEngine[playerid] = SetTimerEx("EngineValue", 1000, true, "ii", playerid, GetPlayerVehicleID(playerid));
            }
        }
        case PLAYER_STATE_ONFOOT: {
            KillTimer(CheckEngine[playerid]);
            EngineStarting[playerid] = 0;
        }
    }
    return 1;
}
Reply


Messages In This Thread
WOW! Engine problem - Engine starts with Forward(W) KEY! - by SkiT'aZ - 22.02.2015, 12:20
Re: WOW! Engine problem - Engine starts with Forward(W) KEY! - by Blade_Cervetti - 22.02.2015, 12:23
Re: WOW! Engine problem - Engine starts with Forward(W) KEY! - by SkiT'aZ - 22.02.2015, 14:58
Re: WOW! Engine problem - Engine starts with Forward(W) KEY! - by Blade_Cervetti - 22.02.2015, 17:28

Forum Jump:


Users browsing this thread: 2 Guest(s)