SA-MP Forums Archive
[Ajuda] Comando pra carro ligar - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Comando pra carro ligar (/showthread.php?tid=391687)



Comando pra carro ligar - GuiihCamargo - 11.11.2012

Galera , os carros do servidor nascem todos desligados!
Queria que quando o player apertasse [SHIFT] o carro ligasse....

Obrigado!


Re: Comando pra carro ligar - Adonay - 11.11.2012

Tenta isso... boa sorte!

Код:
 
#define PRESSED(%0) \
	(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if (PRESSED(KEY_JUMP))
	{
		if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
		{
			new engine,lights,alarm,doors,bonnet,boot,objective;
                        GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective);
                        SetVehicleParamsEx(GetPlayerVehicleID(playerid),VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
		}
	}
	return 1;
}



Re: Comando pra carro ligar - GuiihCamargo - 11.11.2012

Nгo deu certo nгo...