Simple solution... but I don't know it :D
#1

hey guys... how can I make this command show a message "%s has started his engine" and %s beinge the name of the person that started it, but that message shows only to players in a 10 meter radius ?

Here's my CMD


Код:
CMD:veh(playerid, params[])
{
	new engine,lights,alarm,doors,bonnet,boot,objective;
    new veh = GetPlayerVehicleID(playerid);
	if(strcmp(params, "Engine", true) == 0)
	{
		if(IsPlayerInAnyVehicle(playerid))
		{
	 		if(veh != INVALID_VEHICLE_ID)
			{
				if(EngineStatus[playerid] == 0)
				{
					GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
					SetVehicleParamsEx(veh,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
					EngineStatus[playerid] = 1;
					SendClientMessage(playerid, 0xFFFFFFAA, "You've turned the vehicle's engine {2F991A}on!");
				}
				else if(EngineStatus[playerid] == 1)
				{
					GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
					SetVehicleParamsEx(veh,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
					EngineStatus[playerid] = 0;
					SendClientMessage(playerid, 0xFFFFFFAA, "You've turned the vehicle's engine {E31919}off!");
				}
			}
		}
		else {
		SendClientMessage(playerid, 0x00FF00FF, "{E31919}You are not in a vehicle!");
		}
	}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)