I need Something
#1

Hello, I need a system that adds a message to a players screen when he/she enters a vehicle Saying: "Please Drive Not Drive Non RPly"
Reply
#2

Try this:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
SendClientMessage(playerid,0xE6E6FAFF,"Please Drive Not Drive Non RPly");
return 1;
}
I think it should work
Reply
#3

But I got This

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new Model = GetVehicleModel(vehicleid);
    if(Model == 427 && !ispassenger)
    {
        GetPlayerArmour(playerid, StoreArmour[playerid]);
    }
    if(PlayerTied[playerid] != 0)
    {
        ClearAnimations(playerid);
        SendClientMessage(playerid,COLOR_LIGHTRED,"You Have Enterd a Vhe");
    }
    if(PlayerCuffed[playerid] != 0)
    {
        ClearAnimations(playerid);
    }
    {
        SendClientMessage(playerid,COLOR_LIGHTRED,"Please Drive the way you would In real life to Avoid Admin Jail");
    }
    return 1;
}
Reply
#4

For a specific vehicle it would probally go like this.

at the top

Код:
new Vehicle_01;
Under public OnGameModeInit()

Код:
Vehicle_01 = CreateVehicle(411, 1309.7299, -870.1506, 39.2363, 270.8354, 0, 0, 1000);
Under public OnPlayerStateChange

Код:
if(newstate == 2 || newstate == 3)
    {
   	new VehicleID = GetPlayerVehicleID(playerid);
   	if(VehicleID == Vehicle_01)
{
	SendClientMessage(playerid, COLOR_YELLOW, " You have entered a vehicle");
}
}
	return 1;
}
I think that might work

If you want it for a single vehicle under OnPlayerEnterVehicle

Код:
SendClientMessage(playerid, COLOR_YELLOW,"You have entered a vehicle");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)