Private Vehicles - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Server (
https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (
https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Private Vehicles (
/showthread.php?tid=526586)
Private Vehicles -
hossam22 - 18.07.2014
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.
Re: Private Vehicles -
Abagail - 18.07.2014
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;
}