[Pedido] Sistema de /motor
#1

queria pedir sistema de /motor com tecla ou sem

Ja procurei e nгo encontrei
Reply
#2

Quote:
Originally Posted by kauanmota
Посмотреть сообщение
queria pedir sistema de /motor com tecla ou sem

Ja procurei e nгo encontrei
uhhhh, sera que procurou mesmo?
mais tudo bem ta ae seu pedido:

Код:
#include <a_samp>

#define FILTERSCRIPT
#define LARANJA 0xFF6600AA
#define Verde 0x33AA33AA

#if defined FILTERSCRIPT
new luz[MAX_PLAYERS];

public OnFilterScriptExit()
{
	return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
	SendClientMessage(playerid, Verde, "Sistema de Ligar/Desligar carro.By Felipe Melo");
	return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
	if(newstate == PLAYER_STATE_DRIVER)
	{
		SendClientMessage(playerid, Verde, "Para Ligar o Carro Aperte '+' ou 2");
		SendClientMessage(playerid, Verde, "Para Ligar o Farol Aperte Y");
	}
	return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if(newkeys == KEY_YES && IsPlayerInAnyVehicle(playerid))
	{
		new engine, lights, alarm, doors, bonnet, boot, objective;
		if(luz[playerid] == 0)
		{
			new veh = GetPlayerVehicleID(playerid);
			GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
			SetVehicleParamsEx(veh, engine, VEHICLE_PARAMS_ON, alarm, doors, bonnet, boot, objective);
			luz[playerid] = 1;
			SendClientMessage(playerid, Verde, "Farol ligado");
			
		}
		else if(luz[playerid] == 1)
		{
			new veh = GetPlayerVehicleID(playerid);
			GetVehicleParamsEx(veh, engine, lights, alarm,doors, bonnet, boot, objective);
			SetVehicleParamsEx(veh, engine, VEHICLE_PARAMS_OFF, alarm, doors, bonnet, boot, objective);
			luz[playerid] = 0;
			SendClientMessage(playerid, LARANJA, "Farol Desligado");
		}
	}
	if(newkeys == KEY_SUBMISSION && IsPlayerInAnyVehicle(playerid))
	{
		new mot, lu, alar, por, cap, porma, ob;
		new carro = GetPlayerVehicleID(playerid);
		GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
		if(mot == VEHICLE_PARAMS_OFF)
		{
			SetVehicleParamsEx(carro, VEHICLE_PARAMS_ON, lu, alar, por, cap, porma, ob);
			SendClientMessage(playerid, Verde, "Motor ligado");
			}else{
			SendClientMessage(playerid,LARANJA, "Motor Desligado");
			SetVehicleParamsEx(carro, VEHICLE_PARAMS_OFF, lu, alar, por, cap, porma, ob);
		}
	}
	return 1;
}
#endif
ligar carro Y
Ligar farol 2

FS de Felipe Melo
Reply
#3

Vlw msm
Reply
#4

de nada!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)