I need Something
#1

Hello,
I need a tutorial on how to make a message enter the Players screen when he/she enters any vehicle.

Here is what I want written "Please Do not Drive Non RPly, Drive like you would in real life, Driving Non RPly will result in Admin Jail"
Reply
#2

Код:
OnPlayerChangeState(playerid,newstate,oldstate)
{
if(newstate==PLAYER_STATE_DRIVER)
{
GameTextForPlayer(playerid,"~w~Please drive like you~n~would in real life~n~Or you will be~n~~r~JAILED!!!",10000,3);
}
}
Off the top of my head and about to go to bed, but the code you ask for would be something like the above...
However, keep in mind that this will start to annoy your players, this goes off EVERY time they enter that driver seat...
Reply
#3

Quote:
Originally Posted by seanny
Посмотреть сообщение
Hello,
I need a tutorial on how to make a message enter the Players screen when he/she enters any vehicle.

Here is what I want written "Please Do not Drive Non RPly, Drive like you would in real life, Driving Non RPly will result in Admin Jail"
PHP код:
// Top of script
new Text:VehicleMessage;
new 
bool:PlayerVehMessage[MAX_PLAYERS char];
// OnGameModeInit  OR  OnFilterScriptInit
public OnGameModeInit()
{
    
VehicleMessage TextDrawCreate(332.000000,404.000000,"Please Do ~r~~h~not ~w~Drive Non RPly,~n~Drive like you would in real life,~n~Driving Non RPly will result in ~r~~h~Admin Jail");
    
TextDrawAlignment(VehicleMessage,0);
    
TextDrawBackgroundColor(VehicleMessage,0x000000ff);
    
TextDrawFont(VehicleMessage,3);
    
TextDrawLetterSize(VehicleMessage,0.399999,1.400000);
    
TextDrawColor(VehicleMessage,0xffffffff);
    
TextDrawSetOutline(VehicleMessage,1);
    
TextDrawSetProportional(VehicleMessage,1);
    
TextDrawSetShadow(VehicleMessage,1);
}
// OnPlayerStateChange
public OnPlayerStateChange(playeridnewstateoldstate)
{
    if(
newstate == PLAYER_STATE_DRIVER)
    {
        
PlayerVehMessage {playerid} = true;
        
TextDrawShowForPlayer(playeridVehicleMessage);
        
SetTimerEx("RemoveVehMessage"5000false"d"playerid);
    }
    return 
1;
}
// OnPlayerExitVehicle
public OnPlayerExitVehicle(playeridvehicleid)
{
    if(
PlayerVehMessage {playerid})
    {
        
PlayerVehMessage {playerid} = false;
        
TextDrawHideForPlayer(playeridVehicleMessage);
    }
    return 
1;
}
forward RemoveVehMessage(playerid); public RemoveVehMessage(playerid)
{
    if(
PlayerVehMessage {playerid})
    {
        
PlayerVehMessage {playerid} = !true;
        
TextDrawHideForPlayer(playeridVehicleMessage);
    }
    return;

/imageshack/img62/1299/samp033xw.png
/imageshack/img62/8769/samp034sf.png
/imageshack/img580/6338/samp035dk.png

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)