Update server.lua
This commit is contained in:
		
							parent
							
								
									a436fe0287
								
							
						
					
					
						commit
						7167055241
					
				
					 1 changed files with 8 additions and 9 deletions
				
			
		|  | @ -329,11 +329,11 @@ AddEventHandler("okokBanking:SetIBAN", function(iban) | |||
|         json.encode(charinfo), | ||||
|         Player.PlayerData.citizenid | ||||
|     }) | ||||
|      | ||||
|     -- Aktualisiere die IBAN im Client (DIESE ZEILE HINZUFÜGEN) | ||||
|     TriggerClientEvent('okokBanking:updateIban', src, iban) | ||||
| end) | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| QBCore.Functions.CreateCallback("okokBanking:HasCreditCard", function(source, cb) | ||||
| 	local xPlayer = QBCore.Functions.GetPlayer(source) | ||||
| 	if xPlayer ~= nil then | ||||
|  | @ -1522,12 +1522,11 @@ AddEventHandler("okokBanking:UpdateIbanDB", function(iban, amount) | |||
| 			local updated = json.encode(charinfo) | ||||
| 			MySQL.query('UPDATE players SET charinfo = ? WHERE citizenid = ?', {updated, xPlayer.PlayerData.citizenid}) | ||||
| 		end) | ||||
| 		if xPlayer.Functions.ChangeIban then | ||||
| 			xPlayer.Functions.ChangeIban(iban) | ||||
| 		else | ||||
| 			TriggerClientEvent('okokNotify:Alert', _source, 'OKOKBANKING', 'Unable to locate or identify the function ChangeIban. Please refer to the documentation for correct usage and placement!', 5000, 'warning') | ||||
| 				return | ||||
| 		end | ||||
|  | ||||
| 		local charinfo = xPlayer.PlayerData.charinfo | ||||
|         charinfo.iban = iban | ||||
|         xPlayer.Functions.SetPlayerData('charinfo', charinfo) | ||||
|  | ||||
| 		xPlayer.Functions.RemoveMoney('bank', amount) | ||||
| 		xPlayer = QBCore.Functions.GetPlayer(_source) | ||||
| 		local itemCash = xPlayer.Functions.GetItemByName("cash") | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Nordi98
						Nordi98