/engine problem
#1

Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{

	if(IsPlayerInAnyVehicle(playerid))
	{
	  if(PlayerInfo[playerid][pMootor] == 0)
	  {
	    if(newkeys == KEY_JUMP)
	    {
  			PlayerInfo[playerid][pMootor] = 2;
				SetTimerEx("KaivitaMootor", 3000, 0, "i", playerid);
				new string2[256], pname[MAX_PLAYER_NAME];
				GetPlayerName(playerid, pname, sizeof(pname));
				format(string2, sizeof(string2), "* %s ьritab mootorit kдivitada ", pname);
				SendLocalMessage(playerid, LILLA, 7, string2);
			}
		}
		if(newkeys == KEY_SECONDARY_ATTACK)
		{
		  RemovePlayerFromVehicle(playerid);
		  TogglePlayerControllable(playerid, 1);
		}
	}
everything is ok but you can turn the engine on even if the car is buyable car, how can i make that you cant start the engine of buyable cars?

btw im using godfather car system on blank gm
Reply
#2

pawn Code:
if(GetPlayerVehicleID(playerid) != buyable)
Or something like that. Anyways, use an 'if()' thingy checker to check if he isn't in a buyable car.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)