Jump to content

[HELP] Anti Deathmatch Small Error


Sawos

Recommended Posts

Hello MTA Community, 

i've made a script which Makes the Team "name" undamageable until they get a wanted level, i've tried it in many ways and i'm still having this error : 

ANTIDM/Server.lua:3: syntax error near 'end' 

Client Side : 

dmteam = {
["Emergency"] = true,
}

function antidm (Player)
Player = getLocalPlayer()
if dmteam[getTeamName(getPlayerTeam(Player))]  and  triggerServerEvent("Dm", Player, Player) then
cancelEvent()
end
end
addEventHandler("onClientPlayerDamage", getRootElement(), antidm)

Server Side :  

function check(Player)
	(exports.SACGpolice:getWantedLevel(Player) == 0)
end
addEvent("Dm",true)
addEventHandler("Dm", getRootElement(Player), check)

Note : i've done this TriggerServerEvent, cause the "SACGpolice" is exportable with Server Side. 

 

Thank you. 

Edited by Saw^^
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...