SA-MP Forums Archive
I need Something - 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: I need Something (/showthread.php?tid=269537)



I need Something - seanny - 16.07.2011

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"


Re: I need Something - Setkus - 16.07.2011

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


Re: I need Something - seanny - 16.07.2011

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;
}



Re: I need Something - Shockey HD - 16.07.2011

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");