[Help] Newbie absolutely stumped, sending a message when train arrives.
#1

Hey everyone.

I've been trying to do this for a couple of hours, I always try everything I can think of before asking for help - until I get a headache.

Usually the answer is really simple and I'll slap myself for not being able to see it.

I have created an NPC that drives a train around various locations, which is working great.

However I want to make it so that when the train/NPC arrives at certain points a message is sent.

I added this into the script, no errors or warnings but it doesnt work:

Код:
     
new Float:vehx, Float:vehy, Float:vehz;
          GetVehiclePos(Train, vehx, vehy, vehz);
          if (vehx == 1778.8184 && vehy == -1953.8077 && vehz == 14.8756)
		   {
		    SendClientMessageToAll(COLOR_RED, "The train has arrived at Unity Station");
		    }
It's either completely wrong, or in the wrong place in the script. I've used the search and found someone else asking a similar question, however a post or two later they said "SOLVED" but I saw no explanation.

Help is appreciated, thanks in advance!

Sorry if it's a really dumb question - I wouldn't ask if I hadn't tried every idea my little brain is capable of concocting.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)