SA-MP Forums Archive
OnPlayerEnterVehicle. (Message) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: OnPlayerEnterVehicle. (Message) (/showthread.php?tid=254723)



OnPlayerEnterVehicle. (Message) - Dokins - 12.05.2011

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.


Re: OnPlayerEnterVehicle. (Message) - Laronic - 12.05.2011

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


Re: OnPlayerEnterVehicle. (Message) - Sascha - 12.05.2011

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...


Re: OnPlayerEnterVehicle. (Message) - Dokins - 12.05.2011

Thanks