Command not working
#4

Untested. Hope this works.

Код:
new tmpcar = GetPlayerVehicleID(playerid)
if (!IsPlayerInFlyingVehicle(GetVehicleModel(tmpcar))) SendClientMessage(playerid, RED, "You need to be a in vehicle to use this command");
Код:
public IsPlayerInFlyingVehicle(vehicleid)
{
	if(vehicleid == 59 || vehicleid == 577 || vehicleid == 511 || vehicleid == 512 || vehicleid == 593 || vehicleid == 520 || vehicleid == 553 || vehicleid == 476 || vehicleid == 519 || vehicleid == 469 || vehicleid == 460 || vehicleid == 513 || vehicleid == 548 || vehicleid == 425 || vehicleid == 417 || vehicleid == 487 || vehicleid == 488 || vehicleid == 497 || vehicleid == 563 || vehicleid == 447)
	{
		return true;
	}
	return false;
}
However if that code is supposed to be in "public OnPlayerEnterVehicle(playerid,vehicleid,ispassenge r)" Then use the following code:

Код:
public OnPlayerEnterVehicle(playerid,vehicleid,ispassenger)
{
  if (!IsPlayerInFlyingVehicle(GetVehicleModel(vehicleid))) SendClientMessage(playerid, RED, "You need to be a in vehicle to use this command");
  return true;
}
Reply


Messages In This Thread
Command not working - by Torran - 07.03.2010, 22:22
Re: Command not working - by adsy - 07.03.2010, 22:26
Re: Command not working - by Carlton - 07.03.2010, 22:28
Re: Command not working - by Gyvo - 07.03.2010, 22:32
Re: Command not working - by adsy - 07.03.2010, 22:41
Re: Command not working - by Torran - 07.03.2010, 22:45
Re: Command not working - by adsy - 07.03.2010, 23:30
Re: Command not working - by Torran - 07.03.2010, 23:44
Re: Command not working - by Torran - 08.03.2010, 14:44
Re: Command not working - by Gyvo - 08.03.2010, 15:19

Forum Jump:


Users browsing this thread: 1 Guest(s)