Private Vehicle
#1

Hi there.

I have added some cars on my RPG for my members, but people steal them which is a problem. Would it be possible if someone could give me a ready script so it would say when someone enters the car 'This vehicle belongs to 'Player'. Do not steal it! and then this person is forced to get out of the car. Do you get me? So only the person who owns the car, has a entry to it. I hope you understand me, excuse my english

Thanks and Regards
Puzi
Reply
#2

That isnt hard to make...
Reply
#3

You have 2 choices. You lock the car or you eject people when they get in.

https://sampwiki.blast.hk/wiki/SetVehicleParamsForPlayer (you need to loop it for all players)

or

OnPlayerEnterVehicle:
https://sampwiki.blast.hk/wiki/RemovePlayerFromVehicle
And message them.

Quote:
Originally Posted by JoeDaDude
That isnt hard to make...
That's not a very useful post..
Reply
#4

I want so it removes player from the car and he cannot get in and a message is showed up. But i dont understand the second link Would it be possible to get a ready code from you?

P.S - Sorry, im n00b at scripting xD.
Reply
#5

Change the "if(Vehicle isn't theres)" bit to suit you, and try both idk how they'll turn out.

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(Vehicle isn't theres)
    {
        RemovePlayerFromVehicle(playerid);
        SendClientMessage(playerid, 0xFF00FFFF, "You'
re a tard");
    }
    return 1;
}
pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
      if(Vehicle isn't theres)
      {
        RemovePlayerFromVehicle(playerid);
            SendClientMessage(playerid, 0xFF00FFFF, "You'
re a tard");
        }
    }
  return 1;
}
Reply
#6

Quote:
Originally Posted by Weirdosport
Quote:
Originally Posted by JoeDaDude
That isnt hard to make...
That's not a very useful post..
I would'nt of said that, And would of posted the code if i didnt make a promise
Reply
#7

Thank you, i'll try that, if they won't work, ill post back here
Reply
#8

Sorry for double post if applies :P

They both don't work unfortunately They have both 5 errors, but sometimes are different. Btw I don't think I said it, but I want also only the player under desired nick to be able to get in the car. So for e.g. Puzi can go into the car, and rest cannot. If they do, kill!
Reply
#9

You have to change the if bit to suit your script.
Reply
#10

Seems to work, but i don't quite understand you (sorry ). For example, what should i type into the if bit?

//edit: nevermind, got it working, Thank you very much mate!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)