Sawos Posted January 15, 2018 Share Posted January 15, 2018 (edited) 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 January 15, 2018 by Saw^^ Link to comment
Tails Posted January 15, 2018 Share Posted January 15, 2018 (edited) (exports.SACGpolice:getWantedLevel(Player) == 0) that's a syntax error there, you probably want to return the statement return (exports.SACGpolice:getWantedLevel(Player) == 0) Edited January 15, 2018 by Tails Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now