
BinSlayer1
Members-
Posts
491 -
Joined
-
Last visited
Everything posted by BinSlayer1
-
I am not sure I got you right.. But if 2 clients use event triggering to serverside to handle decrementation of a variable then it will happen twice (because 2 clients do it) To avoid this, you'll need to use dictionary tables
-
yes, that is what I said..
-
Rofl, you can't force people to play in your server.. If they want to quit, they will.. let's assume MTA does make a way so you can remove quitting (most idiot idea). So what? If they wanna quit so badly, they'll end the process with ctrl+alt+del or reboot the computer
-
line 16 , use elseif instead of else if (because you only have 1 end for the whole if and if u want to make 2 ifs then u need 2 ends) lines 15, 19 are bugged because that is NOT the correct syntax of setTimer https://wiki.multitheftauto.com/wiki/SetTimer
-
May I suggest that you use a nick protection resource? https://community.multitheftauto.com/index.php?p= ... ils&id=492 it's not a good idea to ban people because the serial doesn't match one in your database, because the admin can simply play from another computer (i.e another serial). A nick protection service would suit your needs much better
-
Here's a sql course: http://www.sqlcourse.com/index.html As far as I can see you're a beginner in scripting. I strongly recommend not to use sql for storage until you get a better understanding of scripting. I suggest xml for storage: https://wiki.multitheftauto.com/wiki/Xml Take a look at all those functions and their respective examples and try to learn from those
-
So you're using the old modules.. Not sure, but they might be outdated or something. However, MTA now has built-in support for mysql (no need for modules anymore) Download latest stable 1.1.1 build: https://nightly.multitheftauto.com/mtasa-1.1.1-rc ... 111213.exe Rewrite your script to make use of the new db-functions https://wiki.multitheftauto.com/wiki/DbConnect Click this link and at the bottom of it you'll see some more db functions like dbQuery and all that
-
well, as long as there are still people around there who will give out full working scripts.. Actually, another way of learning is to get a complete script and trying to understand how everything fits together; and it's rather effective than attempting to create a script from scratch as a newbie
-
maybe the script is fooked post it in here so people can take a look
-
because it will be repeated x (number of players) times and it should be only shown ONCE to EVERYONE, meaning 'root'.
-
Weird enough. Meta looks good too unless the script's name is not 'resetscore.lua' Do you think you could be doing anything wrong? Sometimes you can even miss loading the resource. (i'm not saying you're a noob, i'm just trying to think what could possibly go wrong)
-
addCommandHandler ( "sa", --problems here function ( player, cmd, al3grab ) local accountname = getAccountName(getPlayerAccount(player)) --you missed this if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Console" )) then --here if tonumber ( al3grab ) ~= nil then for id, player in ipairs ( getElementsByType ( "player" ) ) do givePlayerMoney ( player, tonumber ( al3grab ) ) end outputChatBox("#FF0000 *** ADMIN HAS GIVEN MONEY: #00FF00" .. al3grab .. "$ #FF0000 TO ALL PLAYERS *** ", root, 255,0,0,true) --and this is definitely not supposed to be in the For Loop end end end )
-
Post the meta.xml because that's where the problem is most likely It can't be the tostring thing because pname is already a string so it won't make any difference
-
just save it right after you edit it.. if it creates lag while doing so, then you're not supposed to use xml for the desired purposes and you need to think of some other storage method.
-
Don't be like that. It's not like you don't have a topic full of questions such as "What is the function?" People weren't rude to you and they explained stuff to you even though they could have been rude.
-
sry for the offtopic
-
he doesn't need squat.. This is obviously not his full script and he already handles this IF, because he says it's working fine except for the else part which I believe I have fixed
-
Should have errors.. You got 2 ifs and 1 end instead of 2.. LUA has this 'elseif' feature which you can use.. so do this if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Admin" ) ) then setPlayerTeam ( player, teamAdmin) elseif isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "VIP!" ) ) then setPlayerTeam ( player, teamVIP ) else setPlayerTeam ( player, teamPlayers ) end
-
https://community.multitheftauto.com/index.php?p= ... ils&id=601
-
You can't just use that code.. I only showed you how to do it but it obviously won't work because when you get the element data and it's non-existent, it will return false... you can't add a number to false You need to tweak your own "point system" that you say you have to make it work with this..
-
I don't think you need to wait until the race is over. There could be this small text saying "press B to spawn now" right after you join. Check that you don't actually miss it. This can actually be changed. Admin panel -> Resources -> Race and search for something like "allow join-spectating" and set it to false or so. The race gamemode should handle joining players and spawn them providing respawn option is turned on for the map.
-
you can also use client markers with onClientMarkerHit to avoid server/client event triggering
-
easiest 'fix' is to enable respawn otherwise you'll need to edit the race gamemode and how it works which is very complicated to do. I suggest https://wiki.multitheftauto.com/wiki/Scr ... troduction for learning to script first.
-
No offense but how's that gonna help the topic starter? He asks for help on how to create this. Not for servers that already have it
-
str = '1,2,3,4' table = split(str, string.byte(',')) table contains your every character separated by comma in that string. example: table[1] = '1' And if you want to convert from string to number use the function tonumber(str) Spam. I solved it. You edited your freaking post so I didn't know.. Don't call mine a spam then.