[HELP] Police Restriction add


#1

Hi,

Am new at LUA.
I have this code. and i want to add more restrict veh

	TriggerEvent('es:getPlayerFromId', source, function(user)
		TriggerEvent('es_roleplay:getPlayerJob', user.identifier, function(job)
			if(veh == "police2")then
				if(job)then
					if(job.job ~= "police")then
						TriggerClientEvent('es_policeshop:closeWindow', source)
						TriggerClientEvent('chatMessage', source, "SHOP", {255, 0, 0}, "You can only have this car if you are a ^2police^0.")
						return
					end
				else
					TriggerClientEvent('es_policeshop:closeWindow', source)
					TriggerClientEvent('chatMessage', source, "SHOP", {255, 0, 0}, "You can only have this car if you are a ^2police^0.")
					return
				end
			end

I want to put more cars on restriction
Something like this

			if(veh == "police2,police3,policet,sheriff2,police4")then

But how I did it must be wrong.


#2
if(veh == "police2" or veh == "police3" or veh == "policet" or veh == "sheriff2" or veh == "police4")

#3

Sorry guys where can i find this?