local query = dbQuery ( database, "SELECT * FROM characters" )
local result, num_affected_rows, errmsg = dbPoll ( query, -1 )
for _, row in ipairs(result) do
for k, v in pairs(row) do
outputChatBox(tostring(k)..", "..tostring(v))
end
end
Try that.
You can use math.floor to remove all decimals, or use this function to leave just 2 decimals or how much you want.
https://wiki.multitheftauto.com/wiki/Math.round
function randomMarker ( )
local markers = xmlLoadFile ( "zaladunki.xml" )
if ( markers ) then
local childs = xmlNodeGetChildren ( markers )
local randomIndex = math.random ( #childs )
local child = childs [ randomIndex ]
if ( child ) then
-- Do something
end
end
end
God mode for the local player:
addEventHandler ( "onClientPlayerDamage", localPlayer, cancelEvent )
For vehicle:
setVehicleDamageProof ( getPedOccupiedVehicle ( getPlayerFromName ( "TheNameFromThePlayer" ) ), true )