Just a simple thing....... PLEASE SEE
#1

This is my code for engine starting...

I want the message ( SendClientMessage(playerid, 0xFFFFFFAA, kurac ); ) to be shown only to players that are in a 10 meter radius from the player who started the engine.... HOW please help me

Код:
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)
				{
					new kurac[64];
				    GetPlayerName(playerid, name, sizeof(name));
					format(kurac, sizeof(kurac), " %s has stopped his engine!", name);
					GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
					SetVehicleParamsEx(veh,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
					EngineStatus[playerid] = 1;
					SendClientMessage(playerid, 0xFFFFFFAA, kurac);
									}
				else if(EngineStatus[playerid] == 1)
				{
				    new kurac[64];
				    GetPlayerName(playerid, name, sizeof(name));
					format(kurac, sizeof(kurac), " %s has stopped his engine!", name);
					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, kurac);
				}
			}
		}
		else {
		SendClientMessage(playerid, 0x00FF00FF, "{E31919}You are not in a vehicle!");
		}
Reply


Messages In This Thread
Just a simple thing....... PLEASE SEE - by [JnA]DukeNukem - 25.04.2011, 11:20
Re: Just a simple thing....... PLEASE SEE - by Ash. - 25.04.2011, 11:39
Re: Just a simple thing....... PLEASE SEE - by captainjohn - 25.04.2011, 11:42
Re: Just a simple thing....... PLEASE SEE - by [JnA]DukeNukem - 25.04.2011, 11:44
Re: Just a simple thing....... PLEASE SEE - by Antonio144 - 25.04.2011, 11:51
Re: Just a simple thing....... PLEASE SEE - by [JnA]DukeNukem - 25.04.2011, 12:03

Forum Jump:


Users browsing this thread: 2 Guest(s)