-
Posts
1,134 -
Joined
-
Last visited
-
Days Won
37
Everything posted by NeXuS™
-
function checkValues( source,arg1,arg2) if (arg2 >= 60) then t[ source ][ 'min' ] = tonumber( t[ source ][ 'min' ] or 0 ) + 1 t[ source ][ 'sec' ] = 0 end if (arg1 >= 60) then t[ source ][ 'min' ] = 0 t[ source ][ 'hours' ] = tonumber( t[ source ][ 'hours' ] or 0 ) + 1 end dependent(source) return arg1, arg2 end Moving the dependent function out of the if statement will do a better result.
-
The IP and password is not working, because in your SQL Table the two column's type is set to integer, not to text.
-
Where is your onPickupUse variable registered? @kewizzle
-
Good luck with it, I'll be here to help ya.
-
Actually, the first code already worked for me, so it'll be something else I think.
-
No, "?" in SQL executes or querys means a data which will be passed through arguments in the function.
-
Yeah, you are right. It would be that one.
-
getSlotFromWeapon cancelEvent bindKey giveWeapon I think it can be written with these 4 functions.
-
Change dbExec(dbConnection, "INSERT INTO accounts VALUES(nomeBackup, patenteBackup, expBackup)", nomeconta, patente, experiencia) to dbExec(dbConnection, "INSERT INTO accounts VALUES(?, ?, ?)", nomeconta, patente, experiencia)
-
Is it okay if I give you just a little overview of functions you'll need to do this script?
-
Giving the player a gun will always replace the gun which is on the same slot. You could do a custom weapon selection tho, using element datas for ammos, and just giving them weapons giveWeapon, and if he switches off, just take it away with takeWeapon.
-
Does the setLowLODElement function get called?
-
The ... means that you'll get the data from the player. (Like getElementData, etc. We dont know how you just set them, as you set, you'll get them). You'll have to download DB Browser for SQLite, make a file, and rename it as "internal.db". After that, double click on it, and you'll see the "Create Table" button. Press that, and name it as "accounts" then add fields to it. Rename those fields, and set their types. (See attachments.)
-
As I just wrote, edit the internal.db with SQLite, so it means, adding a table, and then doing rows for every single data.
-
Finished it here, because you cannot understand what this section of the forum is for.
-
Jees, let this for moderators, aight?
-
This is not a scripting topic, this is a show off of one of your resources.
-
Is it a working script? Yes, it is. You just released it as a not finished script, and this section is not for this. This is asking for help, when a script is not working as it should, or it's not working at all. (Not finished script, but still at Resources, because this is how it should be.) What help does this script need?
-
This section of the forum is asking for help. Not for releasing scripts. The resources section is for this. @jhxp
-
Can a moderator move this to Resources? @Dutchman101, @JR10.
-
Just make a internal.db and edit it with SQLite, so it has rows for every single data you want to save. local dbConnection = dbConnect("sqlite", "internal.db") function saveStat(sourcePlayer) local pRank = ... local pExp = ... local pData = ... ... dbExec(dbConnection, "INSERT INTO accounts VALUES(?, ?, ?, ...)", pRank, pExp, pData) end addCommandHandler("savestat", saveStat)
-
Just calculations. local fullScrolled = 45 -- How many pixels to the top of the last line of the text. local scrollerHeight = 20 -- The scroller is 20 pixel high. local scrollerWidth = 20 -- The sroller is 20 pixel wide. local fitHeight = 100 -- The panel is 100 pixel high. addEventHandler("onClientRender", getRootElement(), function() dxDrawRectangle(500-scrollerWidth, 200+(math.abs(moveY)/fullScrolled)*fitHeight, scrollerWidth, scrollHeight, tocolor(0, 0, 0, 128)) end) I think this one should work, not tested tho.
-
Then go to your script which increases the player's played hours, and if he reaches a full hour, call the dependent function with the player at arg 1.