Jump to content

trux_yt

Members
  • Posts

    34
  • Joined

  • Last visited

About trux_yt

  • Birthday 31/05/2000

Details

  • Gang
    LV
  • Location
    Argentina
  • Occupation
    Programar
  • Interests
    Mujeres

Recent Profile Visitors

581 profile views

trux_yt's Achievements

Rat

Rat (9/54)

0

Reputation

  1. local function updateNametagColor( player ) local nametagColor = { 127, 127, 127, priority = 100 } if p[ player ] and isLoggedIn( player ) then nametagColor = { 255, 255, 255, priority = 100 } if getOption( player, "staffduty" ) then for key, value in ipairs( groups ) do if isObjectInACLGroup( "user." .. p[ player ].username, aclGetGroup( value.aclGroup ) ) and value.nametagColor then --warn line if value.priority < nametagColor.priority then nametagColor = value.nametagColor nametagColor.priority = value.priority end end end elseif getOption( player, "vip" ) then nametagColor = { 224, 227, 20 } nametagColor.priority = 50 end end setPlayerNametagColor( player, unpack( nametagColor ) ) end Hi, i have this warn in the console, like a loop. Bad argument @ 'isObjectInACLGroup' [Expected acl-group at argument 2, got boolean] How i can solve this??
  2. hmmmm yea, this is correct i use this sql query in another resource and works
  3. I have this error attempt to index global sql a nil value
  4. Client-side: local level = 5 triggerServerEvent("requestGetLevelPlayer", localPlayer) --send level update request (don't use it in onClientRender) addEvent("updateLevelPlayer", true) --event to update level addEventHandler("updateLevelPlayer", root, function(playerLevel) level = playerLevel --update level end ) dxDrawText("LVL: "..level, x*2079, y*185, x*21, y*14, tocolor(255, 255, 255, 255), 1.00, font, "center", "center", false, false, false, false, false) Server-side addEvent("requestGetLevelPlayer", true) --create event on server side addEventHandler("requestGetLevelPlayer", root, function() local sql = exports.sql:query_assoc_single("SELECT nivel FROM characters WHERE characterID = "..exports.players:getCharacterID(source)) triggerClientEvent(source, "updateLevelPlayer", source, sql.nivel) --send level information to client end )
  5. Fine, but i have this error now server triggered clientside event updateLevelPlayer, but event is not added clientside
  6. This works, but, in the client side, how i can made to the level text change the level? PlayerLevel What does it perform?
  7. Hi bro, thx, but i have this error in the server code ``` attempt to index local sql a boolean value ``` in the line 5
  8. hi, how i can use the function local sql = exports.sql:query_assoc_single("SELECT nivel FROM characters WHERE characterID = "..exports.players:getCharacterID(getLocalPlayer)) in the client-side? is for a hud, for example. dxDrawText("LVL: "..tostring(sql.nivel) .."", x*2079, y*185, x*21, y*14, tocolor(255, 255, 255, 255), 1.00, font, "center", "center", false, false, false, false, false)
  9. (IN THIS FOLDER IS THE PHP FILE)
  10. i have this error in the php and i have the folder from GameQ in the directory Fatal error: Uncaught Error: Class 'GameQ\GameQ' not found in C:\xampp\htdocs\asd.php:2 Stack trace: #0 {main} thrown in C:\xampp\htdocs\asd.php on line 2
  11. Hi, I need to know some code for PHP with gameQ and get a value from online players for an MTA server, does anyone have an idea? Thanks
  12. I am looking for some resource that you can deactivate and activate any type of mods that replace models, I tried to search the community but I did not find, if anyone has or knows any like this, please give me the link pls
  13. Forget it, I'm going to delete this as I can't find any solution for it.
  14. --create spikes registerEvent("createSpike", root, function(id, data) createdSpike[id] = {} -- OID: 2892 createdSpike[id].object = createObject(data.objectId, data.posX, data.posY, data.posZ, 0, 0, data.rotZ) local x, y, z = getElementPosition( createdSpike[id].object ) -- get vehicle position local a = getElementRotation( createdSpike[id].object ) -- get player facing angle x = x + math.sin( math.rad(a) ) * 4 y = y - math.cos( math.rad(a) ) * 4 theColShapes = createColRectangle( (x - 2.0), (y - 2.0), 4.0, 4.0 ) -- set a colshape to check when a car hits the stinger setElementData( theColShapes, "amistinger", "yesplz" ) -- set the colshape as a stinger colshape if isElement(sound) then stopSound(sound) end sound = playSound3D("spike.wav", data.posX, data.posY, data.posZ + 0.1, false) print(getSoundLength(sound), getSoundLength(sound) * 1000) initAnimation("spikeAnim" .. id , false, {0, 0, 0}, {1, 0, 0}, 2450, "Linear", function(id, data) local rotated_x1, rotated_y1 = rotateAround(data.rotZ, -spikeDetails[data.objectId].width/ 2, -spikeDetails[data.objectId].length / 2) local rotated_x2, rotated_y2 = rotateAround(data.rotZ, spikeDetails[data.objectId].width / 2, -spikeDetails[data.objectId].length / 2) local rotated_x3, rotated_y3 = rotateAround(data.rotZ, spikeDetails[data.objectId].width / 2, spikeDetails[data.objectId].length / 2) local rotated_x4, rotated_y4 = rotateAround(data.rotZ, -spikeDetails[data.objectId].width / 2, spikeDetails[data.objectId].length / 2) createdSpike[id].col = createColPolygon( data.posX, data.posY, -- Center data.posX + rotated_x1, data.posY + rotated_y1, data.posX + rotated_x2, data.posY + rotated_y2, data.posX + rotated_x3, data.posY + rotated_y3, data.posX + rotated_x4, data.posY + rotated_y4 ) if isElement(sound) then stopSound(sound) end end, {id, data}) end) --wheels addEventHandler("onClientColShapeHit", root, function(vehicle, dimMatch) if vehicle and getElementType(vehicle) == "vehicle" and getElementData( source, "amistinger" ) == "yesplz" then triggerServerEvent("pierceWheel", vehicle) end end) the wheels puncture in only one corner
×
×
  • Create New...