How to make this message show when i enter a vehicle
#1

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
Reply
#2

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!");
Reply
#3

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
Reply
#4

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!
Reply
#5

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
Reply
#6

LOL... Ok, will do! =)
Reply
#7

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!");
            }
        }
    }
}
Reply
#8

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)