[REP+]How to make certain cars (at certain positions) for only vips or admins - 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)
+--- Thread: [REP+]How to make certain cars (at certain positions) for only vips or admins (
/showthread.php?tid=325566)
[REP+]How to make certain cars (at certain positions) for only vips or admins -
stormchaser206 - 13.03.2012
I am using LuxAdmin.
I need to make it possible for only a VIP or Admin to use a certain car.
Lets say i had a police car at Position 0.0, 0.0, 0.0.
I only wanted that car to be enterable by a vip. But since theres more of that type of car on the map for everyone, So only that car at that position could be used by VIP. But the other cars (the same model) on the map could be enterable by everyone.
Also, the admin could be the same example as above, just for admins instead.
Re: [REP+]How to make certain cars (at certain positions) for only vips or admins -
Mike_Peterson - 13.03.2012
As.. I am tired(sorry), i won't make this very hard, just simple
new vipcar;
new admincar;
//ongamemodeinit
vipcar = CreateVehicle(....);
admincar = CreateVehicle(....);
//OnPlayerEnterVehicle
if(vehicleid == vipcar && !IsPlayerVip(playerid) && ispassenger == 0) return SendClientMessage(playerid,-1,"Kiddo, this is a VIP car, go donate!");
if(vehicleid == admincar && !IsPlayerAdmin(playerid) && ispassenger == 0) return SendClientMessage(playerid,-1,"Kiddo, this is an admin car, shoo!");
dno if this works, too tired to double check it, goodluck already.