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 ?