Detecting nearby Andromadas
#1

Hello, I'm trying to make a vehicle transportation system (vehicle goes into an andromada and is then flown to another airport in San Andreas)

The thing that I am having difficulties with, is detecting if there are any Andromadas near, this my code (when the player presses the JUMP key).

Код:
        if(newkeys == KEY_JUMP)
	{
 		for(new i = 0; i < MAX_VEHICLES; i++)
   		{
     		if(GetVehicleModel(i) == 592)
       		{
         		GetVehiclePos(i, Float:ax, Float:ay, Float:az);
			}
		}
		if(IsPlayerInAnyVehicle(playerid))
		{
		    if(!IsAPlane(newcar))
		    {
				if(GetVehicleDistanceFromPoint(newcar, Float:ax, Float:ay, Float:az) < 20)
				{
				    SendClientMessage(playerid, COLOR_GREEN, "IT WORKS!!");
				}
				SendClientMessage(playerid, COLOR_RED, "You are not near an Andromada!");
			}
		}
		SendClientMessage(playerid, COLOR_RED, "You are not in any vehicle!");
	}
Reply


Messages In This Thread
Detecting nearby Andromadas - by Prostilov - 25.08.2012, 16:03
Re: Detecting nearby Andromadas - by Jeffry - 25.08.2012, 17:30
Re: Detecting nearby Andromadas - by Prostilov - 25.08.2012, 18:54
Re: Detecting nearby Andromadas - by Prostilov - 25.08.2012, 19:33

Forum Jump:


Users browsing this thread: 1 Guest(s)