my idea was some what similar to this, but your code doesn't make any sense, If you are using that resource then you will have to use exports. also onplayerweaponswitch is server side it will effect every one.
There was ')' missing in the code in the line 13.
function cars ()
c1 = createVehicle ( 520, -2891.84765625, 460.4560546875, 4.9140625, 0, 0, 90 )
end
addEventHandler("onResourceStart", root, cars)
function onEnter(thePlayer)
if getElementModel(source) == 520 and getElementData(thePlayer, "class") ~= "Admin" then
cancelEvent()
outputChatBox("This Vehicle Is Locked for the Class:Admin", thePlayer, 0, 255, 0)
end
end
addEventHandler("onVehicleStartEnter", getRootElement(Sr))
i think gta3.img not related of the problem
more players modifed their gta3.img and don't have any kick from AntiCheat
it does affect, you can modify your gta.img but if you have any improper file in your gta.img it will create problem.
try this
local flist = { ["SWAT"] = "Army", ["Army"] = "SWAT" }
addEventHandler("onClientPlayerDamage", localPlayer,
function(attacker)
if attacker and getElementType(attacker) == "player" then
local sTeam = getPlayerTeam(localPlayer) --------- swat team
local aTeam = getPlayerTeam(attacker) --------- army team
if aTeam and sTeam and flist[getTeamName(sTeam)] == getTeamName(aTeam) then
cancelEvent()
end
end
end
)
but there is one problem both the team will still be able to kill with knife.
you can use
onClientPlayerStealthKill
to fix it.