Private Vehicles
#1

Hey I Need To Know How To Make A Private Vehicles Script (Dynamic Or Not)

You Know Something Like There's A Car Parked And No One Can Ride It Except Player "A" If Another Players Tries To Drive This Car ("B") He Gets Ejected And A Message Says "This Car Is Reserved For Player A".

Hope You Find A Working Script Thanks.
Reply
#2

Wrong section, how-ever heres an example:

pawn Код:
new gCarOwner[MAX_VEHICLES] = INVALID_PLAYER_ID;

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(!ispassenger && gCarOwner[vehicleid] != playerid) {
RemovePlayerFromVehicle(playerid);
new Float: X, Float: Y, Float: Z;
GetVehiclePos(vehicleid, X, Y, Z);
SetPlayerPos(playerid, X, Y, Z+0.25);
SendClientMessage(playerid, COL_RED, "You don't own this vehicle."); }
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)