[Ajuda] cуdigo n funciona
#5

Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	new id = GetPlayerVehicleID(playerid);

	if(newkeys == 131072 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)   // Verifica se o jogador pressionou o N
	{
		// A gente remove o IsPlayerAnyVehicle pois sempre que ele N espaзo irб aparecer a mensagem.
		GetVehicleParamsEx(id, engine, lights, alarm, doors, bonnet, boot, objective);
		if(engine == VEHICLE_PARAMS_OFF || engine == VEHICLE_PARAMS_UNSET) {
			SetVehicleParamsEx(id, VEHICLE_PARAMS_ON, lights, alarm, doors, bonnet, boot, objective);
			SendClientMessage(playerid, Branco, "Vocк ligou o seu veнculo!");
		}
		else
		{
			SetVehicleParamsEx(id, VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective);
			SendClientMessage(playerid, Cinza, "Vocк desligou o seu veнculo!");
		}
// ------------------------------------------------------------------------------- >>
// PRУXIMO ITEM
//------------------------------------------------------------------------------
		if(newkeys & KEY_YES && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) // Y
		{
			GetVehicleParamsEx(id, engine, lights, alarm, doors, bonnet, boot, objective);
			if(boot == VEHICLE_PARAMS_OFF || boot == VEHICLE_PARAMS_UNSET) {
				SetVehicleParamsEx(id, engine, lights, alarm, doors, bonnet, VEHICLE_PARAMS_ON, objective);
				SendClientMessage(playerid, Branco, "Vocк abriu a mala do carro !");
			}
			else
			{
				SetVehicleParamsEx(id, engine, lights, alarm, doors, bonnet, VEHICLE_PARAMS_OFF, objective);
				SendClientMessage(playerid, Cinza, "Vocк fechou a mala do carro !");
			}
		}
// ------------------------------------------------------------------------------- >>
// PRУXIMO ITEM
//------------------------------------------------------------------------------
	}
/*
	new t[80];
	format(t, sizeof(t)," Tecla: %d", newkeys);
	SendClientMessage(playerid, -1, t);
*/
	return true;
}
public completa.

nгo ta funcionando Ermanhaut

sinceramente pra mim ta tudo certo, o de desligar/ligar com N ta funcionando perfeitamente
serб que tem algo errado aqui
Code:
				SetVehicleParamsEx(id, engine, lights, alarm, doors, bonnet, VEHICLE_PARAMS_ON, objective);
?
Reply


Messages In This Thread
cуdigo n funciona - by dimy - 29.09.2018, 16:10
Re: cуdigo n funciona - by GSantana - 29.09.2018, 16:17
Re: cуdigo n funciona - by Ermanhaut - 29.09.2018, 16:18
Re: cуdigo n funciona - by dimy - 29.09.2018, 16:19
Re: cуdigo n funciona - by dimy - 29.09.2018, 16:22
Re: cуdigo n funciona - by Ermanhaut - 29.09.2018, 16:32
Re: cуdigo n funciona - by dimy - 29.09.2018, 16:41
Re: cуdigo n funciona - by Ermanhaut - 29.09.2018, 16:44
Re: cуdigo n funciona - by dimy - 29.09.2018, 16:54

Forum Jump:


Users browsing this thread: 1 Guest(s)