new CarCheck = GetPlayerVehicleID(playerid); if(CarCheck == Cars[VIPVEHICLES] || CarCheck == Car[VIPVEHICLES] || ..................) { if(RPLLogged[playerid] != 2) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "This Vehicle is for level 2 V.I.P Members only"); return 1; } |
if(CarCheck == Cars[VIPVEHICLES1] || CarCheck == Car[VIPVEHICLES2] || ..................)
if(CarCheck == Cars[VIPVEHICLES] || CarCheck == Cars[VIPVEHICLES1] || CarCheck == Cars[VIPVEHICLES2] || CarCheck == Cars[VIPVEHICLES3] || CarCheck == Cars[VIPVEHICLES4] || CarCheck == Cars[VIPVEHICLES5] || CarCheck == Cars[VIPVEHICLES6] || CarCheck == Cars[VIPVEHICLES7] || CarCheck == Cars[VIPVEHICLES8] || CarCheck == Cars[VIPVEHICLES9] || CarCheck == Cars[VIPVEHICLES10] || CarCheck == Cars[VIPVEHICLES11] || CarCheck == Cars[VIPVEHICLES12] || CarCheck == Cars[VIPVEHICLES13] || CarCheck == Cars[VIPVEHICLES14] || CarCheck == Cars[VIPVEHICLES15] || CarCheck == Cars[VIPVEHICLES16] || CarCheck == Cars[VIPVEHICLES17] ) |
#include <a_samp>
stock v_vip_first, v_vip_last;
#define First_CreateVIPVehicle(%0) SetVehicleNumberPlate((v_vip_first = CreateVehicle(%0, -1, -1, -1)), "V.I.P")
#define CreateVIPVehicle(%0) SetVehicleNumberPlate(CreateVehicle(%0, -1, -1, -1), "V.I.P")
#define Last_CreateVIPVehicle(%0) SetVehicleNumberPlate((v_vip_last = CreateVehicle(%0, -1, -1, -1)), "V.I.P")
#define IsVIPVehicle(%0) (v_vip_first <= (%0) <= v_vip_last) // IsVIPVehicle(vehicleid)
public OnFilterScriptInit()
{
First_CreateVIPVehicle(415, -1687.4291, 1020.2954, 17.3572, 90.5694);
CreateVIPVehicle(415, -1687.3451, 995.5764 ,17.3574, 89.4433);
CreateVIPVehicle(415, -1720.5601, 999.7566 ,17.3575, 89.9307);
CreateVIPVehicle(415, -1736.2394, 1011.8725 ,17.3573, 268.9875);
CreateVIPVehicle(415, -1736.4794, 1049.1646 ,17.3570, 270.3551);
CreateVIPVehicle(587, -1704.9294, 1058.4615 ,17.3126, 179.9306);
CreateVIPVehicle(587, -1693.3130, 977.8688 ,17.3132, 0.9185);
CreateVIPVehicle(587, -1720.7479, 1007.9931 ,17.3125, 90.6050);
CreateVIPVehicle(451, -1721.2965, 1024.4523 ,17.2918, 89.3517);
CreateVIPVehicle(451, -1736.3378, 1057.1055 ,17.2916, 270.4988);
CreateVIPVehicle(451, -1688.1578, 1049.1813 ,17.2914, 89.7993);
CreateVIPVehicle(451, -1703.3026, 1007.8652 ,17.2933, 270.2077);
CreateVIPVehicle(477, -1687.7467, 1036.7361 ,17.3403, 88.6032);
CreateVIPVehicle(565, -1702.7471, 1028.4735 ,17.2098, 269.7582);
CreateVIPVehicle(411, -1736.1897, 1036.5925 ,17.3130, 270.6841);
CreateVIPVehicle(411, -1720.9688, 1011.9447 ,17.3130, 88.8832);
CreateVIPVehicle(521, -1736.5042, 1020.2866 ,17.1566, 268.1967);
Last_CreateVIPVehicle(521, -1687.6051, 1008.0736 ,17.1579, 86.0123);
}
new RPLLogged[MAX_PLAYERS];
#define COLOR_RED 0xFF0000FF
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == 2)
{
if(RPLLogged[playerid] != 2)
{
newstate = GetPlayerVehicleID(playerid);
if(IsVIPVehicle(newstate))
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_RED, "This Vehicle is for level 2 V.I.P Members only");
return 1;
}
}
}
return 1;
}