
iChris
Members-
Posts
27 -
Joined
-
Last visited
Everything posted by iChris
-
You have a space missing before then at 4. row
-
Are you sure that you are near the place where the ped should be?
-
Why are you using type parameter? For tag there is only one parameter available and it is src. https://wiki.multitheftauto.com/index.php?title=Meta.xml
-
For some reason I can't post issues with bug tracer, it says that access is denied. Now about the bug, I got an issue with special letters (ä, ö, ü, õ), after using them in my script and saving the file and reopening it, there are boxes instead of these letters.
-
https://wiki.multitheftauto.com/index.php?title=Scripting_Introduction Read again about command handlers.
-
Would be better if you redo it, because then we can guide you in the right direction and you will learn from your mistakes.
-
Maybe you should first post your code and then we can tell you what you have done wrong.
-
Okay, Error itself: Meta file: http://www.upload.ee/files/171638/meta.xml.html This error occures every time when Script Editor is started and happens with every race resource.
-
Yeah, that would be nice. But I got those errors too, they had to do something with unicode converting.
-
Nice job! But an installer would be nice.
-
Wiki is your friend, https://wiki.multitheftauto.com/index.php?title=Interior_IDs
-
When i started using that module i had same issue and then i tried with extension and it worked fine.
-
Are you sure that in mtaserv.conf you have <module src="mta_mysql.dll"/> ?
-
Got it working, had a logic mistake.
-
function LoadUser() mysqlConnect = mysql_connect("localhost", "root", "pass", "mta") result = mysql_query(mysqlConnect, "SELECT id FROM users WHERE Name = 'iChris'") if (result) then local row = mysql_fetch_row(result) pInfo = {} for i = 1,2 do pInfo[i] = {} for j = 1,2 do pInfo[i][j] = 0 end end --**********************-- pID = 1 pName = 2 --**********************-- pInfo[pID][source] = row[1] pInfo[pName][source] = row[2] testtable = {} testtable[1] = 100 testtable1 = {} testtable1[1] = pInfo[pName][source] --**********************-- end end I tried this way, I was able to retrive testtable[1] and testtable1[1] but not pInfo values ot of LoadPlayer() function. Also I debug, just I didn't showed it here.
-
It seems, like I can't use only values of pInfo outside that function since I put my testtable table under pInfo and I was able to get testtable values outside the function. E: Something wierd: I gave testtable[1] value pInfo[pID][source] (testtable[1] = pInfo[pID][source]) and I was able to use that outside of LoadPlayer() function.
-
The thing is, that I can't use information from pInfo table out of LoadUser() function, but information from testtable table can be used out of LoadUser() function, here is my function: function LoadUser() mysqlConnect = mysql_connect("localhost", "root", "pass", "mta") result = mysql_query(mysqlConnect, "SELECT id FROM users WHERE Name = 'iChris'") if (result) then while true do local row = mysql_fetch_row(result) if (not row) then break end pInfo = {} for i = 1,2 do pInfo[i] = {} for j = 1,2 do pInfo[i][j] = 0 end end --**********************-- pID = 1 pName = 2 --**********************-- pInfo[pID][source] = row[1] pInfo[pName][source] = row[2] --**********************-- end end testtable = {} testtable[1] = 100 end
-
You need to forward your port, google for tutorials!
-
Cmon, my real code has nothing to do with this function, let me explain again: This function works and turns vehicle engine off: function engine (player) local veh = getPedOccupiedVehicle(player) if(veh ) then local engine = getVehicleEngineState(veh ) setVehicleEngineState(veh, false) end end This function dosen't work and vehicle engine stays on: function engine (player) local veh = getPedOccupiedVehicle(player) if(veh ) then local engine = getVehicleEngineState(veh ) if(engine == true) then setVehicleEngineState(veh, false) end end end Got it?
-
Those variable names are just for testing propouses and don't appear anywhere in my script or resource. Also as I mentioned, my problem is that if I check if engine is already on [if(engine == true)] then the engine just won't go off and stays on (2. function), but when I don't make that check, then everything works just fine and engine goes off (1. function)!
-
Sorry, translated. I don't have those two functions both in my script, just when I use first function everything works fine, but when I use second function instead nothing happens..
-
Now I have problem with setVehicleEngineState function, the first one works good, but second for some wierd reason dosen't: 1. function engine (player) local veh = getPedOccupiedVehicle(player) if(veh ) then local engine = getVehicleEngineState(veh ) setVehicleEngineState(veh, false) end end 2. function engine (player) local veh = getPedOccupiedVehicle(player) if(veh ) then local engine = getVehicleEngineState(veh ) if(engine == true) then setVehicleEngineState(veh, false) end end end