Advertisement
Guest User

Untitled

a guest
Jun 26th, 2015
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. local gang_module = {}
  2. --- This function will return weather one user can perform an action the other from the gang.
  3. -- @param action The action as a string to be performed
  4. -- @param kickerSteamID The steamID of the person attempting to kick
  5. -- @param kickeeSteamID The steamID of the victim
  6. -- @return A boolean whether the user can kick the other
  7. function gang_module.canAction(action ,kickerSteamID, kickeeSteamID)
  8. return tonumber(gang_module.doSQL("SELECT `priority_{0}` FROM `gang_ranks` WHERE `id` = (SELECT `rank_id` FROM `gang_members` WHERE `steamid` ={1})",{action, kickerSteamID}))>=tonumber(gang_module.doSQL("SELECT `priority` FROM `gang_ranks` WHERE `id` = (SELECT `rank_id` FROM `gang_members` WHERE `steamid` ={0})",{kickeeSteamID}))
  9. end
  10. return gang_module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement