[about] array
#1

hi sa-mp forum members
newbie here
how do you store three vehicle in array or variable?
// some code here
PHP код:
                if(vehiclemodel == 522)// nrg
                
{
                    
SetVehiclePos(vehicleidx,y,z);
                    
SendClientMessage(playerid,COLOR_REDCOLOR_WHITE" Welcome to San Fierro.");
                    return 
1;
                } 
i want to check the players' vehicle either he\she is in nrg=522, pcj=461 or fcr=521 just like that
but in this case i can only use nrg=522
Reply
#2

PHP код:
if(vehiclemodel == 522 || vehiclemodel == 461 || vehiclemodel == 521
Reply
#3

it's working i don't need to use arrays? thanks anyway
Reply
#4

Quote:
Originally Posted by RedFall
Посмотреть сообщение
it's working i don't need to use arrays? thanks anyway
Nope. It's a logical operator, check here https://msdn.microsoft.com/en-us/library/c6s3h5a7.aspx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)