Protagonist95

Members
  • Content Count

    53
  • Joined

  • Last visited

Community Reputation

3 Neutral

About Protagonist95

  • Rank
    Snitch

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Can you give me a hint how do i insert values into table? Heres the code i wrote mytable = {} function insertGangTable() local connection = dbConnect( "sqlite", "data.db" ) local gang_list = dbQuery( connection, "SELECT id,name FROM gang_list" ) local gang_list_result = dbPoll(gang_list, -1) if gang_list_result then for _,row in ipairs( gang_list_result ) do for _,value in pairs( row ) do table.insert(mytable,...) --- { [id] = "name" } end end end end
  2. How can i pass serverside table to client? --Serverside function selectMembersList ( playerSource ) local connection = dbConnect( "sqlite", "data.db" ) local qh = dbQuery( connection, "SELECT member_login FROM gang_members WHERE gang_id = ?",selectGangIDBySerial(getPlayerSerial(playerSource))) local result = dbPoll ( qh, -1 ) local group_members = {} for _, row in ipairs ( result ) do local player = getPlayerFromSerial(row["member_login"]) table.insert(group_members,getPlayerSerial(player)) end return group_members --table is ok at this point end addEvent( "selectMembersListEvent", true ) addEventHandler( "selectMembersListEvent", resourceRoot, selectMembersList ) --Clientside function addGroupMembers() group_members = triggerServerEvent("selectMembersListEvent",resourceRoot,getLocalPlayer()) for _,value in ipairs(group_members) do -- table expected,got boolean outputChatBox(value) end end addEventHandler( "onClientResourceStart",resourceRoot,addGroupMembers)
  3. function hoursToDays(commandName, hour) local conv_hour = tonumber(hour) local day = math.floor(hour / 24) outputChatBox("Days: " .. tostring(day) .. " Hours: " .. tostring(conv_hour - (day * 24))) end addCommandHandler ( "tm", hoursToDays )
  4. Try using modulo operator,then round the output to int type number
  5. Hello.Does anybody know how to make doublesided marker (talking about checkpoint one,not cylinder) or just recommend the way to create a really large one(size > 300 units) that will not fade away after walking some distance?
  6. Figured out after taking a cup of cofee ))
  7. Markers are round,not straight line
  8. Does anyone have an idea how to create really large wall,that would spread across the whole map(screenshot below) image
  9. I was just thinking about it,and yes.I spawn objects on server side and try to delete them on client side.
  10. Okay,the detach part is successful,but the destroy isn't.Still dont know why... Any ideas?
  11. Okay,but in my situation i would like to remove both.Btw not working.
  12. At 22 line:tmpColshape is nil value.
  13. Not working.Error in getLocalPlayer lines -- attempt to call global