Shorten help
#1

i forgot how to shorten a line can somebody please shorten this for me

pawn Код:
if(CarCheck == Cars[p1] || CarCheck == Cars[p2] || CarCheck == Cars[p3] || CarCheck == Cars[p4] || CarCheck == Cars[p5] || CarCheck == Cars[p6] || CarCheck == Cars[p7] || CarCheck == Cars[p8] || CarCheck == Cars[p9] || CarCheck == Cars[p10] || CarCheck == Cars[p11] || CarCheck == Cars[p12] || CarCheck == Cars[p13] || CarCheck == Cars[p14] || CarCheck == Cars[p15] || CarCheck == Cars[p16] || CarCheck == Cars[p17] || CarCheck == Cars[p18] || CarCheck == Cars[p19] || CarCheck == Cars[p20] || CarCheck == Cars[p21] || CarCheck == Cars[p22])
Reply
#2

shorten aline ? what u mean ?
Reply
#3

it is to long, i need it to be smaller but with all the cars in it
Reply
#4

try this idk if it gonna work i never tested it
pawn Код:
if(CarCheck == (Cars[p1] || Cars[p2] ||Cars[p3] ||  Cars[p4] ||  Cars[p5] || Cars[p6] ||  Cars[p7] ||Cars[p8] ||  Cars[p9] ||  Cars[p10] || Cars[p11] ||  Cars[p12] ||  Cars[p13] ||  Cars[p14] ||  Cars[p15] ||  Cars[p16] ||  Cars[p17] ||  Cars[p18] ||  Cars[p19] ||  Cars[p20] ||  Cars[p21] ||  Cars[p22]))
[/QUOTE]
Reply
#5

dident work
Reply
#6

Quote:
Originally Posted by basse
Посмотреть сообщение
dident work
you mean add more car in this line

small example :

Код:
if(CarCheck == (Cars[p1] || Cars[p2] ||Cars[p3] ||  Cars[p22]   /// big jump xD ===> 3 to 22
||  Cars[p23] ||  Cars[p24]  ||  Cars[p25] )


edit :

Quote:

please shorten this for me

for you mdr

pawn Код:
if(CarCheck == Cars[p1] || CarCheck == Cars[p2] || CarCheck == Cars[p3] || CarCheck == Cars[p4] || CarCheck == Cars[p5] || CarCheck == Cars[p6] || CarCheck == Cars[p7] || CarCheck == Cars[p8] || CarCheck == Cars[p9] || CarCheck == Cars[p10] || CarCheck == Cars[p11] || CarCheck == Cars[p12] || CarCheck == Cars[p13] || CarCheck == Cars[p14] || CarCheck == Cars[p15] || CarCheck == Cars[p16] || CarCheck == Cars[p17] || CarCheck == Cars[p18]
|| CarCheck == Cars[p19] || CarCheck == Cars[p20] || CarCheck == Cars[p21] || CarCheck == Cars[p22])
Reply
#7

Thank you!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)