SA-MP Forums Archive
[Help] for "message in plane" (look at thread hat i mean^^) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help] for "message in plane" (look at thread hat i mean^^) (/showthread.php?tid=98131)



[Help] for "message in plane" (look at thread hat i mean^^) - BMGP - 19.09.2009

hi!

ive made a npc -> flys from airport to airport.
and i want a message if you land on an airport.

Код:
forward lvairport(playerid,vehicleid,ispassenger);
public lvairport(playerid,vehicleid,ispassenger)
{
	if(IsPlayerInAnyVehicle(playerid))
	{
		if (GetVehicleModel(vehicleid) == 519 && ispassenger)
		{
			if(IsPlayerInRangeOfPoint(playerid, 100.0, 1477.654541, 1367.563964, 10.398267))
			{
				GameTextForPlayer(playerid,"Wir sind nun in ~n~~r~Las Venturas ~n~gelandet.",3000,3);
			}	
		}
	}
	return 1;
}
+timer
Код:
SetTimer("lvairport", 500, true);
and yes im able to enter shamal as passenger^^ (-> script)

but if im in the near of the point nothing happends... no gametext^^
why?!


Re: [Help] for "message in plane" (look at thread hat i mean^^) - Wanted1900 - 19.09.2009

You have to use the SetTimerEx function.

https://sampwiki.blast.hk/wiki/SetTimerEx


Re: [Help] for "message in plane" (look at thread hat i mean^^) - BMGP - 19.09.2009

hmm
i just tried. nothing...
is that right:
Код:
SetTimerEx("lvairport", 500, true, "is", 1, "string to pass");


maybe i know whats wrong.^^
for shamal i used this:
http://forum.sa-mp.com/index.php?topic=24754.0
->if you enter the shamal it creates the interior anywhere xD i think..
and maybe the "anywhere" must be at the airport xDDD..
cause you are not moving.. you just press g and you are "in the plane" (interior...)
and if you press F/Enter you teleport in front of the plane. BUT in the script you are a passenger of the plane (-> is passenger...)


Re: [Help] for "message in plane" (look at thread hat i mean^^) - Flo_White - 19.09.2009

why do you check 2 times if the player is in a vehicle?

and try using SetTimerEx("lvairport",1000,1,"d",playerid);


Re: [Help] for "message in plane" (look at thread hat i mean^^) - scandragon - 19.09.2009

While in the interior, you are not anywhere near the plane.
What you're trying to do can't be done that way, atleast I don't believe so..


Re: [Help] for "message in plane" (look at thread hat i mean^^) - Flo_White - 19.09.2009

Quote:
Originally Posted by scandragon
While in the interior, you are not anywhere near the plane.
What you're trying to do can't be done that way, atleast I don't believe so..
but he can check if the plane is near the LV airport or am i wrong? D:


Re: [Help] for "message in plane" (look at thread hat i mean^^) - scandragon - 19.09.2009

Quote:
Originally Posted by Flo_White
Quote:
Originally Posted by scandragon
While in the interior, you are not anywhere near the plane.
What you're trying to do can't be done that way, atleast I don't believe so..
but he can check if the plane is near the LV airport or am i wrong? D:
Sure.. But how is the player to see what the NPC types from somewhere else?
Unless you have it send a pm to everyone who entered the plane..


Re: [Help] for "message in plane" (look at thread hat i mean^^) - gecatahh - 19.09.2009

Why you not make just when get into LS,SF or LV airports to get message Wellcome to LS,SF or LV airport and that is they will know soon will land.
OR you can make when NPC land on LS he need to stop record and start record to SF or LV when Record stop make timer to next record 2 or 5 mins to wait + message to passengers inside plane.


Re: [Help] for "message in plane" (look at thread hat i mean^^) - BMGP - 19.09.2009

ok...
how can i check if the plane is in lv?!^^
cause then i make a message like "the plane landed in Las Venturas. Passengers are now able to get off" or something like that..


Re: [Help] for "message in plane" (look at thread hat i mean^^) - gecatahh - 19.09.2009

Look where the plane stops get coordination s use command PlayerToPoint or another command.Set radius 20 or 50 meters and when NPC is inside that radius make message for all players inside.