Is it possible?
#1

Hey i tried to create something when i enter a car it says

You have entered %i

PHP код:
public OnPlayerEnterVehicle(playeridvehicleidispassenger)
{
  
GetVehicleModel(playerid,vehicleid);
  if(
GetVehicleModel(vehicleid)
  if(
400 <= vehicleid <= 611)
  {
    
SendClientMessage(playerid, -1"You have enterted %i"vehicleid);
  }
  return 
1;

P.S: If you know how to make and IF you make 1 for me then please explain it or give me a simple tutorial.
Reply
#2

vehicleid is the id of the vehicle, not model.

pawn Код:
// to do that, you need an include
SendClientMessage(playerid, -1, "You have enterted %i", vehicleid);
Do you need an explanation ? :
pawn Код:
// This callback is called when a player is entering in a vehicle, not when he is inside
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new model = GetVehicleModel(vehicleid), string[32];

    format(string, sizeof(string), "You are entering in a vehicle. Model : %d", model)
    SendClientMessage(playerid, -1, string)
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)