R.I.P Logic

Members
  • Content Count

    188
  • Joined

  • Last visited

Community Reputation

5 Neutral

About R.I.P Logic

  • Rank
    Mark
  • Birthday 09/11/2003

Details

  • Location
    England

Recent Profile Visitors

457 profile views
  1. R.I.P Logic

    How to make a Ped shoot at the same spot that I do...?

    Thanks you mate, working but about that verification code: " and isElement( element ) and available_types[ getElementType( element ) ] ) then " I had to remove it so it work, it's something in available_types, but nvm I've fix that error in it, thanks.
  2. Hey, I need to know how I can make an Ped shoot at the same spot as I do, addEventHandler( "onClientPlayerWeaponFire", root function ( hitElement, hitX, hitY, hitZ ) --set ped shoot as the same hitElement, example: setPedShootOn( thePed, hitElement ) end ) I appreciate who'll help... Thanks. Plus I need that Ped to follow me where ever I go, is that possible?
  3. R.I.P Logic

    Insert values from dbExec to a grid list

    Nevermind... fixed~
  4. R.I.P Logic

    Insert values from dbExec to a grid list

    function openGrid(plr) local tName = getElementData( plr, "t") local account = dbQuery(con, "SELECT * FROM tSys WHERE tName = ?", tName) local account2 = dbPoll(account, -1) local accountz = dbQuery(con, "SELECT * FROM tSys2 WHERE tName = ?", tName) local accountz2 = dbPoll(account, -1) data1 = {} data2 = {} for ind, col in ipairs(account2) do data1[#data1+1] = {} data1[#data1+1] = col.account end for ind, col in ipairs(accountz2) do data2[#data2+1] = {} data2[#data2+1] = col.T end if ( canPlayerDoActionInGroup( client, "editT") ) then triggerClientEvent( plr, "openGridList", plr, data1, data2) else return end end addEvent("viewGridList", true) addEventHandler("viewGridList", root, openGrid) I've made it a bit better.. I don't know if I did the "dbQuery right", but the part which I want to fix is taking the account2 and accountz2 from those 2 dbQuery, and add them in a grid list which is: function displayActions2(table) guiGridListClear(t) for k, v in ipairs(table) do local row = guiGridListAddRow(t) guiGridListSetItemText(t, row, 1, v[k].account, false, false) end end function displayActions3(table) guiGridListClear(TT) for k, v in ipairs(table) do local row = guiGridListAddRow(TT) guiGridListSetItemText(TT, row, 1, v[k].T, false, false) end end function window( table, table2 ) guiSetVisible( window, true) guiBringToFront( window ) displayActions2( table ) displayActions3( table2 ) end addEvent("openGridList", true) addEventHandler("openGridList", root, window) The error which I'm getting at /debugscript 3 is: ERROR: Tsys.lua:1422: attempt to index field '?' (a nil value) and the line 1422 is: guiGridListSetItemText(t, row, 1, v[k].account, false, false) Which is at the function displayActions2, the thing is I'm not sure if the v[k].account is wrong or the account2 and accountz2 name not working at the function openGrid()... Sorry for my bad skills, I tried to explain as good as possible... I've replace "v[k].account" and "v[k].T" with math.random, and it worked, so all what I know it's either from "v[k].account" or "v[k].T" either from the table "data1" and "data2" either from "dbQuery" ...
  5. R.I.P Logic

    [HELP] How to fix this bug in my pm system?

    If the message isn't appearing when you send it to someone else, it means either table.insert does't work either when you set the message using dxDrawText with the table isn't working...
  6. R.I.P Logic

    [HELP] How to fix this bug in my pm system?

    Fix the table.insert ... As it seems, your'e saving the message in a table.insert so you've to fix when you take the message from the table.. ain't you getting warning or errors at /debugscript 3 ?
  7. R.I.P Logic

    engineApplyShaderToWorldTexture For Vehicles

    About that 'remap' texture, I've found a ".dff" & " .txd" Infernus files, which has at the" .dff" a texture "basemap", when I enable it using a script, the car shader worked successfully, but I don't know how to create a ".dff" file...
  8. function openGrid(plr) local tName = getElementData( plr, "t") local Test3 = getTlist1(tName, false) local Test4 = getTlist2(tName, false) data1 = {} data2 = {} for ind, col in ipairs(Test3) do data1[#data1+1] = {} data1[#data1+1] = col.account end for ind, col in ipairs(Test4) do data2[#data2+1] = {} data2[#data2+1] = col.T end if ( canPlayerDoActionInGroup( client, "editT") ) then triggerClientEvent( plr, "openGridList", plr, data1, data2) else return end end addEvent("viewGridList", true) addEventHandler("viewGridList", root, openGrid) Hello, now in some different ways, I could check if the data of (dbExec) get saved, it does... but the thing is I'm trying to add the data stored inside the (dbExec) in a GridList... Does anyone know how? That is server side, and this is the Client Side: function displayActions2(table) guiGridListClear(t) for k, v in ipairs(table) do local row = guiGridListAddRow(t) guiGridListSetItemText(t, row, 1, v[k].account, false, false) end end function displayActions3(table) guiGridListClear(TT) for k, v in ipairs(table) do local row = guiGridListAddRow(TT) guiGridListSetItemText(TT, row, 1, v[k].T, false, false) end end function window( table, table2 ) guiSetVisible( window, true) guiBringToFront( window ) displayActions2( table ) displayActions3( table2 ) end addEvent("openGridList", true) addEventHandler("openGridList", root, window) to be honest I tried to remove v[k].T and add "test" so it wrote 3 times "test" and I already tried to add 3 different account names.. so I'm just having problem by getting the name and add it in this v[k].T and v[k].account
  9. about engineApplyShaderToWorldTexture what is the texture of a car? Is I use the "vehiclegrunge256" the texture isn't placed right at the car, does someone know it?(For all vehicles.. plane...)
  10. R.I.P Logic

    engineRemoveShaderFromWorldTexture problem..

    I've been working on it since 6 hours.. Anyway, I added a table to store in it the multi "shaderElement" as data[#data+1] = shaderElement .... I took the idea from a old script I made... Thanks a lot.
  11. When I enable the skin, it work 100% but when I try to disable it, it doesn't work, the "ShaderElement", "textureName", "element" data at "engineApplyShaderToWorldTexture" has the same data of "engineRemoveShaderFromWorldTexture" Here's the code: function applyShader ( element, table, _type) for index, value in pairs ( table ) do if ( index == 1 ) then model = value elseif ( index == 2 ) then textureName = value elseif ( index == 3 ) then texturePath = value end end local shaderElement = dxCreateShader ( "shader/shader.fx", 0, 0, false, _type == "skin" and "ped" or "vehicle" or "object" ) local textureElement = dxCreateTexture ( _type.."/textures/"..texturePath ) if ( shaderElement and textureElement ) then dxSetShaderValue ( shaderElement, "Tex0", textureElement ) engineApplyShaderToWorldTexture ( shaderElement, textureName, element ) end end addEvent("shaders.applyShader", true) addEventHandler("shaders.applyShader", root, applyShader) function removeShader ( element, table, _type) for index, value in pairs ( table ) do if ( index == 1 ) then model = value elseif ( index == 2 ) then textureName = value elseif ( index == 3 ) then texturePath = value end end local shaderElement = dxCreateShader ( "shader/shader.fx", 0, 0, false, _type == "skin" and "ped" or "vehicle" ) local textureElement = dxCreateTexture ( _type.."/textures/"..texturePath ) if ( shaderElement and textureElement ) then dxSetShaderValue ( shaderElement, "Tex0", textureElement ) engineRemoveShaderFromWorldTexture ( shaderElement, textureName, element ) end end addEvent("shaders.removeShader", true) addEventHandler("shaders.removeShader", root, removeShader)
  12. R.I.P Logic

    Trigger a table from client-side....

    Worked Thanks 😄
  13. R.I.P Logic

    Trigger a table from client-side....

    I'm trying to trigger a event in it I want to trigger a table to the client side.. skinsShaders = { { skinTo = "RIP", texture = "jpg2/278", worldname = "Sbmotr2", skinID = 134 }, { skinTo = "RIP", texture = "jpg2/298", worldname = "swmotr5", skinID = 230 }, } function sendDatas() triggerClientEvent("applyTheShaderOnSkin", resourceRoot, skinsShaders) end setTimer(sendData, 5000, 1) The thing is, at the Client side I want to get the "skinTo", "texture", "worldname" and "skinID"... Server Side: -- Example, ofc not working... addEvent("applyTheShaderOnSkin", true) function applyTheShaderOnSkin ( table) for index, value in pairs ( table ) do if ( index == 1 ) then element = value.skinTo elseif ( index == 2 ) then textureName = value.worldname elseif ( index == 3 ) then texturePath = value.texture end --......... end end addEventHandler("applyTheShaderOnSkin", root, applyTheShaderOnSkin) I need it like in this form.... is there anyway I can make that? If it's not possible, I'll appreciate if he say it.
  14. I need to check if a player is writing writing in a specific edit I tried to use "onClientGUOChanged" but it isn't what I need, I need to check if the player was writing in a edit and stopped writing and add the value with setElementData
  15. R.I.P Logic

    [HELP] getAccountData

    Nevermind, worked I just needed to use return getAccountData..