Jump to content

Sasu

MTA Contributors
  • Posts

    1,056
  • Joined

  • Last visited

Everything posted by Sasu

  1. Puedes probar restandole a la variable z.
  2. Why dont you tried with slothbot resource ? https://community.multitheftauto.com/ind ... ils&id=672
  3. https://community.multitheftauto.com/ind ... ls&id=3379
  4. Sasu

    bindKey bug?

    Yes, I remember that I have other resource with that event name but I didn't know that triggerClientEvent trigger all resources started that have the same event name. Thank you.
  5. Sasu

    bindKey bug?

    No, this arguments are for other things.
  6. Sasu

    bindKey bug?

    Server: addEventHandler("onPlayerLogin", root, function(_,accPlayer) local accName = getAccountName(accPlayer) local qh = dbQuery(connection, "SELECT MemberGang,MemberRank,MemberSubLeader FROM GangMembers WHERE MemberAccount=?", accName) local result = dbPoll(qh, -1) if result and type(result) == "table" then if #result ~= 0 then if result[1].MemberGang ~= "" then local isOwner = tostring(result2[1].GangOwner) == accName or false local isSubLeader = tonumber(result[1].MemberSubLeader) == 1 or false triggerClientEvent(source, "onLogin", source, true, result[1].MemberGang, isOwner, isSubLeader) else triggerClientEvent(source, "onLogin", source, false) end else triggerClientEvent(source, "onLogin", source, false) end else triggerClientEvent(source, "onLogin", source, false) end end) Client: addEvent("onLogin", true) addEventHandler("onLogin", root, function(haveGang, gangName, isOwner) guiCreateGangPanel() end)
  7. Sasu

    bindKey bug?

    My problem is that for some reason the function trigger twice with one bindKey. Here is a part of my code: function guiCreateGangPanel() bindKey("F6", "down", bindPanel) end function bindPanel() local bool = guiGetVisible(gangPanel.window[1]) outputChatBox(tostring(bool)) guiSetVisible(gangPanel.window[1], not bool) showCursor(not bool) if bool then guiSetVisible(gangList.window[1], false) guiSetVisible(gangInvitations.window[1], false) else refreshInfoGang() end end I tried it with the outputChatBox, it output: false true Thanks.
  8. Sasu

    radar

    Only for the knowledge, how can I know how many gta units have 1px?
  9. Sasu

    Blips

    I think that is you set 'visibleDistance' argument to 0, it will apear only on the f11.
  10. See the example of getKeyState, that is what you want.
  11. Use string.format: dxDrawText(string.format("%02d:%02d", hours, minutes),sWidth*0.95486, sHeight*0.01112, sWidth*0.00694, sHeight*0.01112,tocolor(160,160,160,255),0.6,"bankgothic","left","top",false,false,false)
  12. Sasu

    fuego infinito

    Los argumentos de la funcion que ejecutas en el setTimer va en los ultimos argumentos de esta. Por lo tanto, quedaria asi: setTimer (setPedOnFire, 5000, 20, getRootElement(), true )
  13. I tried string.find(" d", "%a") That string at argument 1 have 7 spaces but string.find return me 2,2 . I want to get the first letter's place in the string.
  14. As the title says, if there any way to check if the string have at least one letter without do a loop?
  15. xmlNodeGetValue devuelve un string por lo tanto es obvio que no puedes hacer operaciones matematicas con un string. Primero lo debes convertir en numero con tonumber, luego sumarlo y convertirlo en string con tostring. Quedaria asi: local success = xmlNodeSetValue ( bus,tostring(tonumber(xmlNodeGetValue(bus))+60))
  16. Sasu

    Help me

    function rejoinMe() redirectPlayer(source,"200.98.128.99",22002) end addEventHandler ( "onPlayerJoin", getRootElement(), rejoinMe )
  17. Sasu

    Mysql problem

    Works, thank you.
  18. Sasu

    Mysql problem

    Hi! This is a part of my script: dbQuery ( connection , "CREATE TABLE IF NOT EXISTS Vehicles (VehicleID INT NOT NULL PRIMARY KEY AUTO_INCREMENT, VehicleAccount TEXT, VehicleModel INT, VehicleFuel INT, VehicleHealth INT, VehicleCost INT, VehicleR INT, VehicleG INT, VehicleB INT, VehicleX INT, VehicleY INT, VehicleZ INT, VehicleRX INT, VehicleRY INT, VehicleRZ INT)" ) --(...) local qh = dbQuery ( connection , "INSERT INTO Vehicles (VehicleAccount, VehicleModel, VehicleFuel, VehicleHealth, VehicleCost, VehicleR, VehicleG, VehicleB, VehicleX, VehicleY, VehicleZ, VehicleRX, VehicleRY, VehicleRZ) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)", accName, id, 1000, 1000, cost, r, g, b, x, y, z, rx, ry, rz) local _,_,vehicleID = dbPoll( qh, -1 ) And when the INSERT query trigger debugscript 3 says "dbPoll failed; Column count doesn't match value count at row 1" and the INSERT don't work. Thank you
  19. You missed a comma on line 3 in the table at argument 1 of 'isAccountInGroup'.
  20. Instala la actualizacion manualmente, visita https://nightly.multitheftauto.com/
  21. Thank you very much. Well, I think I will call a friend who knows php to get the mp3 stream url.
  22. Hello. I want to ask if it is there any page to search music by an API? Like FFS, I don't know how they get it but I guess with an API. Thank you very much.
  23. function isElementOnAir(element) if isElement(element) then local elementType = getElementType(element) if elementType == "ped" or elementType == "player" then return ( not isPedOnGround(element) ) elseif elementType == "vehicle" then return ( not isVehicleOnGround(element) ) else return false end else return false end end This work for peds, players and vehicles but not with objects.
  24. function Enter(p,seat,jacked) if jacked then cancelEvent() --outputChatBox("No enter in vehicle with owner",p) end addEventHandler("onVehicleStartEnter",root,Enter)
×
×
  • Create New...