OnPlayerEnterVehicle. (Message)
#1

Hello, I've used Wikipedia to try and send a message to the person who enters any vehicle as a driver. I tried this:

Code:
public OnPlayerEnterVehicle
SendClientMessage(playerid, COLOR_WHITE, "Type /eon to start your engine, Type /carhelp for more functions.");
    return 1;
}
Wouldnt even compile.

Can someone explain to me why this doesnt work and provide a code that would?

Thanks.
Reply
#2

pawn Code:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    SendClientMessage(playerid, COLOR_WHITE, "Type /eon to start your engine, Type /carhelp for more functions.");
    return 1;
}
OnPlayerEnterVehicle
Reply
#3

pawn Code:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
  if(!ispassenger)
  {
    SendClientMessage(playerid, COLOR_WHITE, "Type /eon to start your engine, Type /carhelp for more functions.");
  }
    return 1;
}
before you add this, search in your script for the OnPlayerEnterVehicle function... this should be added by default...
Reply
#4

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)