Command to Button
#3

Heh i found it self

Код:
#define PRESSED(%0) \
	(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if (PRESSED(KEY_CROUCH))
	{
		if (IsPlayerInAnyVehicle(playerid))
                if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
		{
			RepairVehicle(GetPlayerVehicleID(playerid));
		}
	}
	return 1;
}
Reply


Messages In This Thread
Command to Button - by MrEnd - 01.04.2012, 23:25
Re: Command to Button - by Catalyst- - 01.04.2012, 23:48
Re: Command to Button - by MrEnd - 01.04.2012, 23:53

Forum Jump:


Users browsing this thread: 1 Guest(s)