[1000 Scripting Discussion Page!] Is there any rent car system?
#8

Quote:
Originally Posted by Sneaky.
I can help you get started, but you will have to edit/add other stuff yourself:

pawn Код:
// On Top:
new MyVehicle;

// OnGameModeInit
MyVehicle = CreateVehicle(451, 0, 0, 0, 0, 0, 0, 1000); // change the coordinates to your own

// OnPlayerStateChange
public OnPlayerStateChange(playerid, newstate, oldstate)
{
  if(newstate == PLAYER_STATE_DRIVER && GetPlayerVehicleID(playerid) == MyVehicle) // check if the newstate is driver and the vehicleid is "MyVehicle"
  {
    SendClientMessage(playerid, 0xFFFF00, "Do a rent system here!"); // replace this with whatever you want todo when they enter "MyVehicle"
    return 1;
  }
  return 1;
}
Hope this will get you started
Would that work for several vehicles, or only one, with the name MyVehicle?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)