Jump to content

if not , else issue


icarus

Recommended Posts

I made this part, i already tryed "if", nbut didnt work, so i tryed "if not", still the same.

this is part of the script

  
---serverside 
function checkBBHQspawn() 
  if not isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( source ) ), aclGetGroup( "Admin" ) ) then 
  triggerClientEvent ("onnotHQverification", source)  
else 
    setPlayerNametagColor ( source, 255, 140, 0 ) 
    spawnPlayer ( source, 2392, 2792, 14, 180, 211, 0, 0, blackbulletsteam ) 
    giveWeapon ( source, 31, 500) 
    giveWeapon ( source, 27, 500) 
    giveWeapon ( source, 24, 150) 
    giveWeapon ( source, 34, 150) 
    giveWeapon ( source, 46, 150) 
    giveWeapon ( source, 16, 30)    
end 
end 
addEventHandler("onHQbbmembersbutton", getRootElement(),checkBBHQspawn) 

---Clientside 
  
addEvent ("onnotHQverification", true) 
  
function ifnotBBHQ() 
outputChatBox ( "#FF0000You need to be HQ or Admin to spawn as HQ", 255, 255, 255, true ) 
end 
addEventHandler("onnotHQverification",getLocalPlayer(),ifnotBBHQ) 

I dont know whats the problem, it outputs the chatbox, but it still it lets the player spawn, can u help me on this ?

Link to post

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