[Help] for "message in plane" (look at thread hat i mean^^)
#1

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?!
Reply
#2

You have to use the SetTimerEx function.

https://sampwiki.blast.hk/wiki/SetTimerEx
Reply
#3

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...)
Reply
#4

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

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

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..
Reply
#6

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:
Reply
#7

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..
Reply
#8

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.
Reply
#9

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..
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)