-
Posts
1,248 -
Joined
-
Last visited
Everything posted by WhoAmI
-
local seconds = 5 function consoleAddUpgrade ( thePlayer ) if ( isPedInVehicle ( thePlayer ) ) then local id = tonumber ( 1139 ) local theVehicle = getPedOccupiedVehicle ( thePlayer ) if ( theVehicle ) then addVehicleUpgrade ( theVehicle, id ) end end end addEventHandler ( "onMapStarting", root, function ( ) setTimer ( function ( ) for _, player in pairs ( getElementsByType ( "player" ) ) do consoleAddUpgrade ( player ) end end, seconds * 1000, 1 ) end );
-
How is this 'gasoline' saved? And what's the maximum range of it? 0-100?
-
https://github.com/Woovie/dxGUI
-
If you want 5s interval, for i, v in pairs ( Inter.rows ) do local row = unpack(v) local name = guiGridListGetItemText ( Inter.grid.list, row, 1) local dtxd = Downloader.Mods[ name ].txd local ddff = Downloader.Mods[ name ].dff local t = ( i - 1 ) * 5000 setTimer ( function ( ) triggerEvent("startDownloadModSelected", root, dtxd, ddff) end, ( t == 0 ) and 50 or t, 1 ); Inter.refresh ( ); end
-
Are you sure that it is s-side script?
-
setCameraTarget ( player, chair )
-
No problem.
-
Well, while you inserting row into gridlist, insert it also into table.
-
triggerServerEvent("pershingsquarespawn", localPlayer) Show your "pershingsquarespawn" event. You have to insert there setting skin's model. Not in client-side.
-
If you are using race gamemode local seconds = 5 function consoleAddUpgrade ( thePlayer ) if ( isPedInVehicle ( thePlayer ) ) then local id = tonumber ( 1139 ) local theVehicle = getPedOccupiedVehicle ( thePlayer ) if ( theVehicle ) then addVehicleUpgrade ( theVehicle, id ) end end end addEventHandler ( "onMapStarting", root, function ( ) setTimer ( function ( ) for _, player in pairs ( getElementsByType ( "player" ) ) do consoleAddUpgrade ( player ) end, seconds * 1000, 1 ) end );
-
When you are using event again you have to set playing = false.
-
local playing = false function speed() if ( enablelight ) and ( getVehicleOverrideLights ( theVehicle ) ~= 2 ) then dxDrawImage(x*960+x2, y*470+y2, 306, 232, "files/2/light.png", 0,0,0, tocolor(255, 255, 255 , 255)) if ( not playing ) then playSound("files/lightswitch.mp3") playing = not playing end else dxDrawImage(x*960+x2, y*470+y2, 306, 232, "files/2/light2.png", 0,0,0, tocolor(255, 255, 255 , 255)) end end addEventHandler ( "onClientRender", root, speed )
-
Ta funkcja składni jest np++ z odpowiednim pluginem.
-
https://community.multitheftauto.com/index.php?p= ... ls&id=1316
-
Client side godModeTeams = { ["Name"] = true, } addEventHandler ( "onClientPlayerDamage", localPlayer, function ( ) local team = getPlayerTeam ( source ) if ( team and godModeTeams [ getTeamName ( team ) ] ) then cancelEvent ( ) end end )
-
function rejestracja() un = guiGetText(uzytkownik) psw = guiGetText(haslo) auth = guiGetText(powtorzhaslo) if un ~= "" and psw ~= "" then if psw == auth then triggerServerEvent("rejestruj", getLocalPlayer(), un, psw) end end if un == "" then exports["notifications"]:showBox("info", "Pole z nazwą użytkownika nie może pozostać puste!") end if psw == "" thne exports["notifications"]:showBox("info", "Pole z hasłem nie może pozostać puste!") end end addEventHandler("onClientGUIClick", rejkaBUTTON, rejestracja, false)
-
Just use masks as objects, and attach them to skin model.
-
To create database you can create a file with '.db' extension and connect to it using dbConnect ( "sqlite", "file.db" ) For rest you have example up.
-
Use dbExec for inserting/updating values into database. Use dbQuery for selecting values from database. Remember to free querys by using dbFree. If you are using dbPoll, you don't have to free them - dbPoll free them automatically. Examples -- conencting connect = dbConnect ( "sqlite", "somefile.db" ) -- creating tables dbExec ( connect, "CREATE TABLE IF NOT EXISTS `table` (`column1` INTEGER, `column2` TEXT)" ) -- inserting values dbExec ( connect, "INSERT INTO `table` SET `column1`=?, `column2`=?", 0, "test" ) -- or dbExec ( connect, "INSERT INTO `table` ( `column1`, `column2` ) VALUES (?,?)", 0, "test" ) -- updating values dbExec ( connect, "UPDATE `table` SET `column1`=?", 1 ) -- selecting values and showing them local q = dbQuery ( connect, "SELECT `*` FROM `table`" ) for k, v in pairs ( dbPoll ( q, -1 ) ) do print ( v["column1"], v["column2"] ) end
-
You are creating file with '.db' extension, or you connect to global internal.db. Inserting and updating is done by database questions.
-
Your table looks liek that table = { { name, exp, cash }, { name, exp, cash}, ... } It's easy to loop table and show it's values. for _, v in pairs ( table ) do local name, exp, cash = unpack ( v ) -- now you have 3 values, you have to insert it to gridlist using guiGridListAddRow end
-
addCommandHandler ( "addword", function ( player, cmd, word ) if word then table.insert ( Table, tostring ( word ) ) end end ) addCommandHandler ( "removeword", function ( player, cmd, word ) if word then for k, v in pairs ( Table ) do if v == word then table.remove ( Table, k ) break end end end end )
-
Change "rot3" to "rot3 - 180" or "rot3 + 180". Check what works.