Klesh Posted January 28, 2012 Share Posted January 28, 2012 Hello, i was trying to make a script that kills the ped when this one is on a specified team, but nothing, only for the players can mute or admins. function privatet (thePlayer) steam = getTeamFromName("Admin") if steam and not isObjectInAclGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Admin") then killPed(source) outputChatBox("You are not part of the sarg team." source, 255, 0, 0) end end addEventHandler("onPlayerSpawn", getRootElement(), privatet) Link to comment
Castillo Posted January 28, 2012 Share Posted January 28, 2012 function privatet () local steam = getTeamFromName("Admin") if (steam and not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then killPed(source) outputChatBox("You are not part of the sarg team." source, 255, 0, 0) end end addEventHandler("onPlayerSpawn", getRootElement(), privatet) It's isObjectInACLGroup with upper case "ACL", you used "Acl". Link to comment
Klesh Posted January 28, 2012 Author Share Posted January 28, 2012 The ped isn't killed when it spawns at that team. Link to comment
JR10 Posted January 28, 2012 Share Posted January 28, 2012 function privatet () local steam = getTeamFromName("Admin") if (getPlayerTeam(source) == steam and not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then killPed(source) outputChatBox("You are not part of the sarg team." source, 255, 0, 0) end end addEventHandler("onPlayerSpawn", getRootElement(), privatet) 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