Anticheat using for more cars
#1

How i can edit this code, for more than 1 ID using.

Example:



Код:
if(GetVehicleModel(currentveh) == 420, 421, 422, 433)
{
DestroyVehicle(currentveh);
return 0;
}
Original code:

Код:
if(GetVehicleModel(currentveh) == 420)
{
DestroyVehicle(currentveh);
return 0;
}
Reply
#2

pawn Код:
if(GetVehicleModel(currentveh) == 429 || GetVehicleModel(currentveh) == 423 || GetVehicleModel(currentveh) == 422|| GetVehicleModel(currentveh) == 421)
+rep if it worked :P
Reply
#3

Use a switch,it's more better:

pawn Код:
switch(GetVehicleModel(vehicleid))
{
    case 420, 421, 422, 433:
    {
        //Your code here
    }
}
Reply
#4

Thanks all!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)