
proracer
Members-
Posts
499 -
Joined
-
Last visited
Everything posted by proracer
-
For race gamemode - go to admin panel and click on resource: "race" (not double click, single click!) and then click "Settings" There you can see setting "Clouds enable", double click it and set it to false. For scripts: https://wiki.multitheftauto.com/wiki/SetCloudsEnabled
-
Nice one, I'm sure that with that word everyone will help you.
-
For example you can create global variables in 1 lua file and use it within the resource folder, while local variables are more faster then global ones and are most common used. You can read more: http://lua-users.org/wiki/ScopeTutorial Also if I'm not wrong you can use local variables within the whole script or inside the function.Ones inside function are used only in that function while the ones that aren't in function can be used within the whole code.
-
Well I saw that I can use SQLite functions with PHP.Will reply when I have more questions.
-
Hello everyone,How can I select and open database "registry.db" and use it in php file.Also can it be synced so players don't need to refresh browser .. do I need to use AJAX for that or..? I'm not so good on those programming languages. Edit: I can use PHP SDK with callRemote?
-
Try this: marker = createMarker(3461,0,0,"corona",6,255,0,0,255) function hovercars(hitElement,matchingDimension) setWorldSpecialPropertyEnabled('hovercars',true) outputChatBox('It worked!') -- if it outputs this it works (delete if you dont want it - its just debug) end addEventHandler("onClientMarkerHit", marker, hovercars)
-
Can't you see it must be a string not a variable, also 2nd var is wrong too.
-
You must create database first and you can do it by registering on site which hosts free web-sites. Then you can read syntax for sql: http://dev.mysql.com/doc/refman/5.6/en/
-
function BadWords ( message, messageType ) if message == ':O' then setPlayerMuted(source, true) outputChatBox ( getPlayerName ( source ).." has mute bad words", getRootElement(), 255, 255, 0, true ) end end addEventHandler ( "onPlayerChat", getRootElement(), BadWords )
-
Maybe this? function playerFinishATO() local liczbaIteracji = #playersInMM for i_pla, v_pla in ipairs(playersInMM) do if not exports.race:isPlayerFinished(getPlayerFromName(v_pla)) then break elseif liczbaIteracji == i_pla then wyliczIleZapisac() end end end
-
They are often used for debugging.Use /debugscript to check any errors.Check if it outputs to chatbox that on line 2.
-
Proracer, this has nothing to do with "freeroam", this is a normal script. By the way, why are you guys checking every weapon? why don't you create a table with the ID's/Prices? Dude, I never worked with that functions so I don't know what they will do... They save money or not..?
-
Read my next post, I said I'm not experienced in freeroaming and I don't use that way.
-
Dre, isn't that the same as mine?
-
I'm not so experienced in freeroam but I think that built-in money functions: takeMoney, setPlayerMoney is only temporarily.. That means it won't save the data when a player leaves or am I wrong?
-
It doesn't work that way, you should make script with cash functions first: https://wiki.multitheftauto.com/wiki/SetAccountData or with XML or SQL system.
-
addCommandHandler ( 'pinfo', function ( ) for pID,pName in ipairs ( getElementsByType ( 'player' ) ) do outputChatBox ( 'Player: ' .. getPlayerName ( pName ), source ) outputChatBox ( 'IP: ' .. getPlayerIP ( pName ), source ) outputChatBox ( 'Ping: ' .. tostring(getPlayerPing ( pName )), source ) -- maybe you dont need to use tostring but safety first end end) You can use the command with " / " or with ingame console.
-
You can use setAccountData and setElementData to save it and then when he joins again use getAccountData with setElementData.
-
Probably because you have to be at those co-ordinates, try this: function lockcar ( ) local x,y,z = getElementPosition(getLocalPlayer()) myVehicle = createVehicle ( 432, x, y+2, z ) setElementData ( myVehicle, "owner", 'kimmis9' ) end addEventHandler ( 'onClientResourceStart', getResourceRootElement(getThisResource()), lockcar )
-
@Solidsnake: There is a function in votemanager/votemanager_polls.lua at line 684-703 (getPlayerByNamepart)