-
Posts
1,056 -
Joined
-
Last visited
Everything posted by Sasu
-
Puedes probar restandole a la variable z.
-
Why dont you tried with slothbot resource ? https://community.multitheftauto.com/ind ... ils&id=672
-
https://community.multitheftauto.com/ind ... ls&id=3379
-
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.
-
No, this arguments are for other things.
-
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)
-
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.
-
See the example of getKeyState, that is what you want.
-
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)
-
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 )
-
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.
-
As the title says, if there any way to check if the string have at least one letter without do a loop?
-
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))
-
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
-
You missed a comma on line 3 in the table at argument 1 of 'isAccountInGroup'.
-
Instala la actualizacion manualmente, visita https://nightly.multitheftauto.com/
-
Thank you very much. Well, I think I will call a friend who knows php to get the mp3 stream url.
-
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.
-
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.
-
function Enter(p,seat,jacked) if jacked then cancelEvent() --outputChatBox("No enter in vehicle with owner",p) end addEventHandler("onVehicleStartEnter",root,Enter)