I have my own server. We have been working on a script that only let’s users on a list drive the admin vehicles in the server. We’ve gotten bits from other scrips and come up with some on our own and everything is working except being able to check player names against a list. if i take out the name part it disables the veh just fine. Can anyone help with the line and list please.
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
local ped = GetPlayerPed(-1)
local name = GetPlayerName(PlayerId())
local veh = GetVehiclePedIsUsing(ped)
local model = GetEntityModel(veh)
if name ~= "john" , "kira" then
if IsPedInAnyVehicle(ped) then
local car = GetVehiclePedIsIn(GetPlayerPed(-1), false)
if IsVehicleModel(car, GetHashKey("admin",_r)) then
SetVehicleUndriveable(GetVehiclePedIsUsing(ped), true)
end
end
end
end
end)