Overkillz

Members
  • Content count

    296
  • Joined

  • Last visited

Community Reputation

1 Neutral

About Overkillz

  • Rank
    Pee-Wee
  1. Question about setElementData & getElementData

    Well, It could help me, but not at all. For example. If Im specting to some player who is in any vehicle and that vehicle has nitro and nitro is being used. If u switch to another player and switch back to the previous player and try to get the nitro level with the funciton GetVehicleNitroLevel you are not going to get the real nitro level. It gets restarted everytime. Thats why I want to use setElementData on a render (I want to do a draw with the real nitro level). Regards.
  2. Hey dear community, today im here to ask you if I use setElementData and getElementData on a function which has as event onClientRender will give me problems ? I have used it but I would like to know everything about it. Thanks for reading, regards.
  3. Problem in my admin panel !

    Are you aware that you need to restart the server after editing ACL.XML manually ? Remember that you can get the original ACL.XML with the following steps Shut down your server Remove ACL.XML via FTP or something similar Start/Run the server again. After running on the server again, probailly you need to restart it again to add your account to ACL.XML Regards.
  4. Problem Rendering mask shader

    I tried it but the image isn't the same for everybody. Each one has his own image.
  5. Problem Rendering mask shader

    Hey dear community, Im trying to draw multiple photos using mask shader. The script is based on shader_hud_mask or something like that. Well, my problem is that using this method it lags me a lot, but a lot of. I hope you can help me to use a better way for it. function dxDrawMaskAvatar(posX,posY,sizeX,sizeY,url,r,g,b,a,postGUI) if url and url ~= "" then imageTexture = dxCreateTexture(url) hudMaskShader = dxCreateShader("files/img/hud_mask.fx") maskTexture1 = dxCreateTexture("files/img/circle_mask.png") validMask = hudMaskShader and imageTexture and maskTexture1 if not validMask then outputChatBox( "Could not create some things. Please use debugscript 3" ) else dxSetShaderValue( hudMaskShader, "sPicTexture", imageTexture ) dxSetShaderValue( hudMaskShader, "sMaskTexture", maskTexture1 ) end --### DRAW dxSetShaderValue( hudMaskShader, "sMaskTexture", maskTexture1 ) dxDrawImage( posX,posY,sizeX,sizeY, hudMaskShader, 0,0,0, tocolor(r,g,b,a),postGUI or false ) end end --######## --##Draw Avatar --######## function testingDrawAvatar() dxDrawMaskAvatar(sX/2,sY/2,sY*0.05,sY*0.05,"files/img/defaultavatar.png",255,255,255,255,true) dxDrawMaskAvatar(sX/2,sY/3,sY*0.05,sY*0.05,"files/img/user.png",255,255,255,255,true) end addEventHandler( "onClientRender", getRootElement(),testingDrawAvatar) Thanks for reading.
  6. dbExec Problem

    Im a bit dump. I have solved the problem following ur example. I didn't realize that ??=?? expression is remplaced by the arguments. However, I was using a for, so, the code can be shorter by this local tableNamecall = "core_members" local name = "name" for i=1,#tableAccount do local randomValues = math.random(1000,328842) dbExec( dbConnectTable.connection, "UPDATE ?? SET ??=? WHERE ??=?", tableNamecall, tableAccount[i], randomValues, name, account ) end Regards. #You can close the topic
  7. dbExec Problem

    Hey there dear community, today I started to work on a system which will be sync with my forum, leaving out it. Im trying to update a value on a colum, however, I couldn't do it due to I cannot understand at all dbExec Function local tableAccount = {"plCash","plPoints","plMapsplayed","plMapswon","plWinratio","plHunters","plToptimes","plToptimes1","plPvps","plPvpswon","plPvpsratio"} function updatePlayerDatas(account) for i=1,#tableAccount do local randomValues = math.random(1,328842) dbExec (dbConnectTable.connection, "UPDATE core_members SET "..tableAccount[i].."="..randomValues.." WHERE `name` = "..account .."" ) end end Table: core_members Column: tableAccount Array Debugscript 3 drops me: You have an error on your SQL syntax ... Thanks for reading. Regards.
  8. SetTimer problem [create vehicle script]

    I don't think so
  9. Can Anyone fix this for me ?

    Your function is a bit weard, I'm not sure if semi1 is the left or right one, anyways I left u a comment respecting it. Also, there are some unnecessary things like Circle Width and dxGetTextWidth is not defined as a varaible, so, u can use it like that function dxDrawRoundedRectangle( x, y, width, height, color, postGUI ) local color = color or tocolor( 0, 0, 0, 150) dxDrawRectangle(x, y, width, height, color, postGUI) --Semi 1 Circle must be the LEFT one and Semi 2 Circle must be the RIGHT one dxDrawImage(x-height, y, height/2, height, "img/semi.png", 0, 0, 0, color, false) dxDrawImage(x+width, y, height/2, height, "img/semi2.png", 0, 0, 0, color, false) end NOT TESTED. PS: I would use dxDrawImageSection using just a circle
  10. SetTimer problem [create vehicle script]

    local allowedToSpawnVehicle = true function createVehicleForPlayer(thePlayer, command, vehicleModel) if allowedToSpawnVehicle then local x,y,z = getElementPosition(thePlayer) x = x + 5 if not vehicleModel then outputChatBox("SYNTAX:/createvehicle [id]",thePlayer) return end createVehicle(tonumber(vehicleModel),x,y,z) allowedToSpawnVehicle = false blockerTime = setTimer(function() allowedToSpawnVehicle = true end,1000,1) else outputChatBox("You cannot create a vehicle now!!Please try later again!",thePlayer,255,255,255,true) end end addCommandHandler("createvehicle", createVehicleForPlayer) Remember that it 1000 miliseconds is ONE second, so, be aware of it, I have changed something on the code, try it now. Regards. PS: The script is serverside
  11. SetTimer problem [create vehicle script]

    Im not sure if you are trying to block the function to create vehicle during a second after creating one. In case of yes, try this local allowedToSpawnVehicle = true function createVehicleForPlayer(thePlayer, command, vehicleModel) if allowedToSpawnVehicle then local x,y,z = getElementPosition(thePlayer) x = x + 5 local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z) if (createdVehicle == false) then outputChatBox("SYNTAX:/createvehicle [id]",thePlayer) end allowedToSpawnVehicle = false blockerTime = setTimer(function() allowedToSpawnVehicle = true end,1000,1) else outputChatBox("You cannot create a vehicle now!!Please try later again!",thePlayer,255,255,255,true) end end addCommandHandler("createvehicle", createVehicleForPlayer) It is not tested Regards.
  12. Restore Shaders

    No, I think u didn't understand me. Well, let me explain slowly. Some mappers apply shaders to their maps like skybox, watershaders ...etc I started the script and the first of the script works pretty well, it removes all the shaders IF THE PLAYER WANTS by clicking a simple key. However, If they want to restore it, they can't, I want to allow them to restore the shaders that were removed previously. Thats why I don't know what should I put on the second argument of engineApplyShaderToWorldTexture Regards.
  13. Restore Shaders

    Hey dear community, Im having a little issue to restore map shaders. I already used getElementsByType and apply it to an table to save all the datas that it got. It work pretty well while removing, but when i want to restore them, I don't know what can I put on the 2nd argument of engineApplyShaderToWorldTexture function lalala() if(#shadersTab > 0)then for i,shaderr in ipairs(shadersTab)do engineApplyShaderToWorldTexture( shaderr, "What to put here ?" ) end end end I hope u can understand me, Regards.
  14. Hud Problem

    Try to use a onClientRender to keep it function wawawa() setPlayerHudComponentVisible(..Your Arguments ...) end addEventHandler("onClientRender",getRootElement(),wawawa) It is clientside
  15. Round an image

    Thanks man, I've got it how does it work now. Regards # You can close the topic.