Sjoerdva97

Untitled

Jun 1st, 2018
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.42 KB | None | 0 0
  1. function setPlayerFactionRank(player, rankID)
  2.     if (not player or not rankID) then return false end
  3.     if (not isElement(player) or getElementType(player) ~= "player" or type(rankID) ~= "number") then return false end
  4.    
  5.     local charID = exports.global:getCharacterIDFromName(getPlayerName(player))
  6.     dbExec( db, "UPDATE `characters_faction` SET `faction_rank` = '?' WHERE `character_id` = '?'", rankID, charID)
  7.     return true
  8. end
Advertisement
Add Comment
Please, Sign In to add comment