-
Posts
2,973 -
Joined
-
Last visited
-
Days Won
3
Everything posted by 50p
-
He never said anything about MySQL. SQLite is fast for saving/reading. Accounts are not as fast as SQLite if you deal with loads of accounts. It's because accounts.xml is rewritten every time something changes, say you have 1000 accounts and you want to change just one attribute of one account, it will have to rewrite entire file to do so, at least AFAIK.
-
Calculate it? Depends what kind of text you're adding. You can use relative coords which are between 0 and 1 (1 = full width, height, etc), where 0.5 is half length (middle of the screen or parent element).
-
You don't seem to create zones when resource starts. You only create them when commend is typed in. When you restart resource, colshapes, vehicles, objects, markers, etc. made with your script are deleted. So you have to create your zone again after you restart resource.
-
I made a patch for MTA which adds function "getResourceFiles" which returns table of all client-side files (s) but because they moved to Git, I can't commit anything I add or fix... It's also useful for resources like speedometer where server owner would like to add their own gauge without modifying script but just adding new to meta.xml. Same for MP3 players, server owner could add new and script would know about this. You can't access file without knowing its name.
-
In SA:MP you see a text for " x " milliseconds and the text dissapear. There are many types of text in SA:MP. But I don't means a static text ( with shadow,etc ) only a little text for show something. Example: This car is for sale. Price: 3000$ when a player its near http://wiki.sa-mp.com/wiki/GameTextForPlayer and http://wiki.sa-mp.com/wiki/GameTextStyle Thanks for all That's exactly what you need. dxDrawText. There was a text library which should simplify it for you. Search the forum for "text lib" or "textlib".
-
10k polys is not a problem. I bet it's MTA's fault. Have you tried different smaller objects? Cut the track into smaller objects and export them separately.
-
If your track is large and it's only 1 object then you'll get problems with it disappearing because if the distance of the object center (whatever 0,0,0 was in 3ds max) to the player is larger than 300 (by default), the track will disappear. There was a topic about custom objects recently in which we talked about that issue. I can't find it for you now, I don't have time.
-
This code has so many errors that it'd take me way too long to correct them for you... 1. All your guiCreate... functions have wrong argument which is true. Why is that? Because it looks like, coords and size of elements use non-relative coords but the true tells the function to use relative coords. That will create elements so far away that you'll never see them. If you haven't changed it yourself then tell author of the gui editor to fix this bug. 2. You're trying to attach event handler to Cancel, but what is Cancel? It's not declared anywhere. 3. You're trying to show wdnLogin but that's the same problem.. It's not declared anywhere so it's nil. This is all I noticed but there is probably more...
-
https://community.multitheftauto.com/index.php?p= ... ils&id=124
-
You probably want: "SELECT FROM WHERE nick='player' ORDER BY score DESC"
-
Erhm... I use XP Post your problem in MTA:SE topic and continue the discussion there. 2. Post more code here or debug it yourself. Probably it's not the function's fault but your script's.
-
https://wiki.multitheftauto.com/wiki/OnClientPlayerJoin If you have ever read wiki, you'd know.
-
I have been trying to find a way to fix this problem with files not being saved but I can't do much without having access to Vista nor 7. I'm guessing you're not using XP because to my knowledge, nobody who is running XP has this problem.
-
1. Yes. When you're making your own home system then you can use anything you like. 2. Both of your xmlCreateFile samples are invalid. If you had used MTA:SE you wouldn't get that error because you would know what's wrong with this code immediately. I won't say what's wrong because you want to learn, so check your code. Or download MTA:SE and open your resource with it, then open the file in which this code is and you'll find out what's wrong. 3. When you change accounts.xml manually, server doesn't know about it and uses the values which were loaded before editing it. If you want to change values of attributes then you have to use setAccountData instead. 4. giveTo will always be nil at if giveTo and amount then line since you declare it as local inside an if statement which is different block (learn more about it here). So, it will always go to else which is that message you get.
-
Every player is a ped but not every ped is a player. In this case, if I understood you correctly, you want a ped to drive a train? Then I'm guessing it won't work because peds don't sync but other players.
-
Probably most of the code can be simplified. I worked with them long time ago when they weren't Valhalla but MTA:RP. I left the team since I realized that RP is not interesting in any way. "Follow the rules or I'll ban you", "Change your name or I'll ban you", "Don't kill other people or I'll ban you" thanks for this kind of server but I want to enjoy playing. Read nice long story to answer 10s of questions, if you won't answer enough questions correctly, you can't play.
-
for i = 1, 2 do local tempVeh = createVehicle(resultvehicle[i].ModelID, resultvehicle[i].PosX,resultvehicle[i].PosY,resultvehicle[i].PosZ) setVehicleColor( tempVeh, 126, 126 ); end
-
Every SDK for MTA uses HTTP requests to call exported functions therefore every function you want to call with SDK needs to be exported with http attribute set to true. And Jason_Gregory, it's not #C it's C#.
-
You can't change LOD of vehicles AFAIK. Changing element's LOD distance higher than 500 has no effect because the element gets deleted.
-
You would not. Didn't I make myself clear? If wheels model ID is the same as different objects in GTA then you won't replace it. Besides, if you've read wiki you'd know you can only replace vehicles and objects.
-
Why did you create new topic about the same subject? And saying "it's not working" doesn't tell us much. Tell us more.
-
In order to replace texture of a model you have to know its ID. Skins are models from 0 to 288. If wheel's ID is in that range then it won't replace the wheels texture but skin (character) with specified ID.
-
logIn function asks you for 3 arguments. getPlayerAccount gives you account that player is currently using.. What's the point of logging into the same account which is also guest account? Think about it. What you want is get an already created account of the players. Look at the accounts function and what do you see there? Oh, there is getAccount function, I wonder what does it do? Do you think you may use this function? Is it what you want? local ACCOUNT = getAccount( getPlayerName( player ) ); logIn( player, ACCOUNT, password );
-
Lua has a secret table when you have function with ... param which is arg, so you don't have to make new table like { ... } just use arg[1], arg[2], etc.
-
No, callRemote doesn't support GET. If it did, you would be informed about it on function's wiki page. { } is as you know a table. So, in this case, Table.one or Table["one"] would return "1". Where do you get this kind of JSON objects from anyway?
