Code:
public OnPlayerConnect(playerid)
{
engine = TextDrawCreate(514.400329, 205.333312, "Turn On Engine");
TextDrawLetterSize(engine, 0.449999, 1.600000);
TextDrawAlignment(engine, 1);
TextDrawColor(engine, -1);
TextDrawSetShadow(engine, 0);
TextDrawSetOutline(engine, 1);
TextDrawBackgroundColor(engine, 51);
TextDrawFont(engine, 1);
TextDrawSetProportional(engine, 1);
PlayerTextDrawSetSelectable(playerid, engine, true);
return 1;
}
Code:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new vID=GetPlayerVehicleID(playerid);
TextDrawShowForPlayer(playerid, engine);
PlayerTextDrawSetSelectable(playerid, engine, true);
}
}