Jump to content

[Help] SQL


Stranger

Recommended Posts

hi, i have a little problem, i have make it a grid list and make it save the text on it so,

it's work fine but i want to make it save the player name too, but no

it's only save the text but the name shows like this 'userdata: 0x1119b'

i don't know what is the problem.

Server side:

  
-- export function 
function addLog (plrName, text) 
setSQL_Data (plrName, text) 
for k,v in ipairs (getElementsByType ("player")) do 
triggerClientEvent (v, "addServerLog", v, plrName, text) 
end 
end 

Client side:

addEvent ( "addTheLog", true ) 
addEventHandler ( "addTheLog", root,function ( onClientSqlList ) 
        guiGridListClear ( grid ) 
        for _, v in ipairs ( onClientSqlList ) do 
        row = guiGridListAddRow ( grid ) 
        guiGridListSetItemText (grid, row, 1,  "" .. tostring(v.plr) .. " " .. tostring ( v.log ), false, false ) 
        guiGridListSetItemColor (grid, row, 1, 0, 255, 0) 
        end 
    end 
) 

so help please.

Edited by Guest
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...