Why won't this work.
#1

Basicly i want it so that when a player enters a checkpoint, it checks to see if he is in a vehicle. If no delete checkpoint. If player is in vehicle check vehicle id. if vehicle if == taxi (420) display the test text message (see code). If vehicleid == truck (515), check trailer etc. The trailer works but when i enter checkpoint in taxi it is saying no trailer which is for trucks only. Hopefully you can see what i mean from code below.

Код:
public OnPlayerEnterCheckpoint(playerid)
{
	new vehicleid = GetPlayerVehicleID(playerid);
	if (vehicleid == 420){
	  GameTextForPlayer(playerid, "~r~test. ~w~~n~Noob", 2000, 3);
	    }
	    else {
	if (IsPlayerInVehicle(playerid,vehicleid))
	if (IsTrailerAttachedToVehicle(vehicleid))
 	{
		GameTextForPlayer(playerid, "~r~Congratulations! ~n~Successfully Completed! ~n~~g~$5,000", 5000, 3);
		GivePlayerMoney(playerid, 5000);
		DisablePlayerCheckpoint(playerid);
		SetVehicleToRespawn(vehicleid);
	}
	else
	{
		GameTextForPlayer(playerid, "~r~You need a trailer. ~w~~n~Noob", 2000, 3);
	}
	else
	{
		DisablePlayerCheckpoint(playerid);
	}}}
Thanks in advance,
Josh
Reply


Messages In This Thread
Why won't this work. - by Bofhead - 21.06.2009, 07:12
Re: Why won't this work. - by Abernethy - 21.06.2009, 07:18
Re: Why won't this work. - by Bofhead - 21.06.2009, 07:20
Re: Why won't this work. - by MenaceX^ - 21.06.2009, 07:20
Re: Why won't this work. - by Bofhead - 21.06.2009, 07:22
Re: Why won't this work. - by Abernethy - 21.06.2009, 07:24
Re: Why won't this work. - by Bofhead - 21.06.2009, 07:27
Re: Why won't this work. - by Abernethy - 21.06.2009, 07:37
Re: Why won't this work. - by Bofhead - 21.06.2009, 07:38
Re: Why won't this work. - by Abernethy - 21.06.2009, 07:44

Forum Jump:


Users browsing this thread: 1 Guest(s)