![](https://forum.multitheftauto.com/uploads/set_resources_22/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
pa3ck
Members-
Posts
1,141 -
Joined
-
Last visited
-
Days Won
7
Everything posted by pa3ck
-
Oh so you are using the server console to restart stuff? Well, whenever I script I'm on the server so that I can use binds, that's a different story.
-
"bind 1 cleardebug" "bind 1 restart my-resourcename" Takes you 1 key press. Also, I like to save my scripts as I go and most of the times the script is broken/not finished while I save it, it would be pointless to restart it, wouldn't it? You can probably develop this feature yourself within MTA boundaries.
-
You could either store it as JSON or create a primary key - foreign key relation between tables. Eg. Teams: ID: 1, Name: MyTeam ID: 2, Name: YourTeam TeamRanks: TeamID: 1, Name: Rank 1 TeamID: 1, Name: Rank 2 TeamID: 2, Name: Rank 1 TeamID: 1, Name: Rank 3 TeamID: 2, Name: Rank 2 Then something like this to get the list of ranks for a specific team: SELECT * FROM TeamRanks WHERE TeamID LIKE getPlayerTeamId(player)
-
Did you just say "FFS" to get help from volunteers?
-
Your if statement is not inside a loop or any sort of event that would be called when the skin changed. You'll need to detach - get current skin - attach when the skin is changed, how are you changing skins? Command, GUI?
-
gui Graphical User Interface[GUI] Segítség!
pa3ck replied to WorthlessCynomys's topic in Hungarian / Magyar
Ha 2 kulon fajlban van 1 resourcen belul, akkor csak akkor fog egymassal utkozni, ha a valtozok nem "local"-ban vannak definialva. Tehat ha van egy guiButton = create... legyen local guiButton = ... -
Search script developer(scripter) for dm server (free/pay)
pa3ck replied to RussianLord's topic in Scripting
I do understand that you have all the "rights" to look for a scripter on the forums, but why do you think people would go to your server and work for free? Just to be titled as "Scripter"? Anyone who is good at MTA scripting would just make the server themselves and do it for their own good... Maybe this is one the reasons you could not find anyone yet, but good luck anyway. -
The problem wasn't the way you inserted it, but the value you inserted. You had table.insert(bills, i) which should have been table.insert(bills, object)
-
Does it need to be a circle shape? I think it would be much easier to do it with dxDrawRectangle shape with no masking at all.
-
You can just store the XML on server side, so player's won't be able to edit it. Even if they do, the checksum will be different and will be downloaded (AFAIK that's how server side files are downloaded) If you don't want to use XML, use JSON, that works as well and probably easier to load from JSON anyway.
- 5 replies
-
- data storage
- data storage client
-
(and 1 more)
Tagged with:
-
As you said 2 tables with primary and foreign key would be the best performance wise imo. Remember that SQL was made to handle such queries, just make sure you have index on the right column(s) and be smart with your queries. If you already know what's the next map going to be, you can get the result before the map actually ends and cache it. You can also normalise your data structure a bit more so that for example you won't have the map creator name for every map but a foreign key to a creators table, so whenever you're querying, it wouldn't need to look through all that useless data. And of course, relational database like SQL should not have duplicate data anyway.
-
The event is in your gamemode, how could I know the name of it?
-
Maybe this can help you a bit:
- 14 replies
-
- getelementboundingbox
- vehicle
-
(and 1 more)
Tagged with:
-
Okay, this section is for helping scripters when they are stuck / need help. There's another section for requesting code. If I understand you correctly, you want a timer that changes vehicles every x seconds and resets when a map starts. Well, probably there is no magic behind it, there must be an event which calls the new maps, use that event to reset your timer. As far as I'm concerned, the timer part has already been posted in this topic.
-
Player logs in -> get owned vehicles list -> store them in a table -> trigger to client with the table content -> populate GUI from the table -> whenever the user click's a vehicle to spawn trigger to server with the details of that veh -> spawn the veh server-side
-
Oh, okay, I understand what you are looking for now. See the way every vehicle have moving parts, like doors, boot etc, these are all vehicle components. You can also add your own component with modeling. You can give these unique components name, like "rear_wing" and then you can use something like this to change it's position: setVehicleComponentPosition(vehicleElement, "rear_wing", 5, 5, 5) Don't ask me about modeling, unfortunately I have no idea about that part. But try to download a car model from the internet, chances are, there's a unique component already modeled in it and you can mess around with that to see how it actually works. You can also test the function by changing default GTA components' attributes.
-
I don't think he is trying to destroy element data, I guess "playerCol" is some sort of a marker that's been stored in the element data. See the problem is, that we can't see where the "source" is coming from, can you also include the function that calls these 2 lines?
-
Move line 11 before the "local parent = ....."
-
Post your whole server/client scripts for the ban resource.
-
bindKey("x", "down", function() showCursor(not isCursorShowing()) end)
-
First of all, I would put the loops that populate the gridlist inside a function that takes an argument, which is the "search" string that you get from the editbox. Use the event onClientGUIChanged to call this function with the GUI text from the editbox, clear then re-populate the list that matches with the string (string.find as Simple said)
-
So since you created this topic (June) you still have no idea how to reset a counter? That means you are just lazy to do anything. Also a tip, when you forget your password on a forum account, try to use "Forgot my password" link to recover it, don't need to create different accounts every time you need help.