forked from mtcontrib/factions
		
	Permission bug fix
If a player does not have a rank this function will crash the game.
This commit is contained in:
		
							
								
								
									
										12
									
								
								factions.lua
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								factions.lua
									
									
									
									
									
								
							| @@ -409,11 +409,13 @@ function factions.Faction.has_permission(self, player, permission) | |||||||
|         return false |         return false | ||||||
|     end |     end | ||||||
|     local perms = self.ranks[p] |     local perms = self.ranks[p] | ||||||
|     for i in ipairs(perms) do | 	if perms then | ||||||
|         if perms[i] == permission then | 		for i in ipairs(perms) do | ||||||
|             return true | 			if perms[i] == permission then | ||||||
|         end | 				return true | ||||||
|     end | 			end | ||||||
|  | 		end | ||||||
|  | 	end | ||||||
|     return false |     return false | ||||||
| end | end | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user