Jump to content

Cancel spawn


Klesh

Recommended Posts

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
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
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

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...