SA-MP Forums Archive
How to make this message show when i enter a vehicle - 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: How to make this message show when i enter a vehicle (/showthread.php?tid=51076)



How to make this message show when i enter a vehicle - JoeDaDude - 16.09.2008

Ok the topic subject isent all true,
Anyway i want to make a message show up when you enter a vehicle,
But i want to make it so aswell as show the message also create the vehicle,
I already know AddStaticVehicle but i dont know how to change the message,
So any help would be much much apreciated, Ye i want to know because im making
my own private car script but i cant find any tutorials, Yes so as i said any help would
be much much apreciated, If you couldnt understand,
I want to make a message show up on one vehicle that the code/script creates.

Yes thanks
JoeDaDude

If i do acclompish this private car script,
I will give most credits to sidhu123 aka [SAP]Sidhu
As he inspired me with his private car script, And gave
me the idea of creating my own script!
And the last reason is because he got me going as an
Pawno scripter, and taught me everything i know about scripting


Re: How to make this message show when i enter a vehicle - sidhu123 - 16.09.2008

Well, Heres one thing... Only thing I'm telling you :P

Код:
if(strcmp(PlayerName, "PLAYERNAME", false) == 0
      {
        SendClientMessage(playerid, green, "Welcome to your private vehicle, PLAYERNAME!");



Re: How to make this message show when i enter a vehicle - JoeDaDude - 16.09.2008

Quote:
Originally Posted by sidhu123
Well, Heres one thing... Only thing I'm telling you :P

Код:
if(strcmp(PlayerName, "PLAYERNAME", false) == 0
      {
        SendClientMessage(playerid, green, "Welcome to your private vehicle, PLAYERNAME!");
Thankyou for that code


Re: How to make this message show when i enter a vehicle - sidhu123 - 16.09.2008

No problem... And thats pretty much all you need.. The rest of the code you should know how to make, its REALLY basic.
And how about makin the topic subject true so people can help you further!


Re: How to make this message show when i enter a vehicle - JoeDaDude - 16.09.2008

Well i am a begginer to scripting,
Il have to look at a few tuts
But it should be easy to learn
Btw il send u the script ( when i finish it )
And you add as much credits as you want
Cause i dno whatta put


Re: How to make this message show when i enter a vehicle - sidhu123 - 17.09.2008

LOL... Ok, will do! =)


Re: How to make this message show when i enter a vehicle - Zezombia - 17.09.2008

Here's a small code I made a while back, but you'll probably find it useless:

pawn Код:
PrivateCar(playerid, privateid, pname[])
{
    new vehicleid = GetPlayerVehicleID(playerid);
   
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        if(vehicleid == privateid)
        {
            new pname2[MAX_PLAYER_NAME];
            GetPlayerName(playerid, pname2, sizeof(pname2));

            if(strcmp(pname2, pname, true) == 0)
            {
                new string[256];
                format(string, sizeof(string), "Welcome to your car %s!", pname2);
                SendClientMessage(playerid, yellow, string);
            }
            else
            {
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, red, "You don't have the keys for this car!");
            }
        }
    }
}



Re: How to make this message show when i enter a vehicle - JoeDaDude - 12.04.2009

Ok This Is For Anyone Who Knows,
This is responding to sidhus code,
I got all the code except that,
Does that code provided by Sidhu
Go under OnPlayerStateChange Or OnPlayerEnterVehicle