-
Posts
141 -
Joined
-
Last visited
Everything posted by rafull6
-
Here is a script with command /open to open the gates: function createTheGate () myGate = createObject ( 988, -1973.7736816406, 293.73452758789, 35.114318847656, 0, 0, 0 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate ) function openMyGate ( ) moveObject ( myGate, 3000, -1973.7736816406, 293.73452758789, 29.902069091797 ) setTimer ( movingMyGateBack, 5000, 1 ) end addCommandHandler("open",openMyGate) function movingMyGateBack () moveObject ( myGate, 4000, -1973.7736816406, 293.73452758789, 35.114318847656 ) end addCommandHandler("open",openMyGate) - You can change OPEN to what you want (it's a command) P.S. Don't forget to change the cordinates!
-
Problem is finished if ( getElementType (element) == "player" ) then " element" must be changed. In my way to thePlayer.
-
Hi guys! During 2 days i worked under one map. Then i saved it and started new one. When i tried to load my 1st one, it didn't load... I've opened console and saw some warnings and errors. Look at the, please: Is it mean that my map lost, or what? Can i load my map back, or it's dead? What should i do?
-
Ow))) Now it's works. Thank you very much)
-
Uncompress the file mta_mysql.dll into your C:\Program files\MTA San Andreas\server\mods\deathmatch\modules\ --- There wasn't such directory, so i created it--- directory and the file libmysql.dll into your C:\Program files\MTA San Andreas\server\ directory. --Added-- Then, add the following line in mtaserver.conf: In mtaconf lines was like that: <!-- Specifies the module(s) which are loaded with the server. To load several modules, add more <module> parameter(s). Optional parameter. --> <!-- <module src="sample_win32.dll"/> --> <!-- <module src="sample_linux.so"/> --> i added mta_mysql.dd line and now it is like that: <!-- Specifies the module(s) which are loaded with the server. To load several modules, add more <module> parameter(s). Optional parameter. --> <!-- <module src="mta_mysql.dll" /> --> <!-- <module src="sample_win32.dll"/> --> <!-- <module src="sample_linux.so"/> --> What is wrong then?
-
Gamesnert, thank you! I understood how to use it, but it's still won't work, don't know why... I've installed this module but it's still shows me the same errors. Mey be there is a problem in my cfg.lua? cgf.lua --//// Cannonball's Extended usersystem! ////-- --//// Fully MySQL based. ////-- --//// This script may not be shared under any circumstance's. ////-- --//// Copyrights ©Cannonball ////-- --//// Coded by Cannonball ////-- local host = "localhost" local user = "root" local password = "hereismypass" local database = "mtadatabase" connect_mysql = mysql_connect(host, user, password, database ) if not connect_mysql then outputChatBox( no_connect_sql_message ) end
-
Hi, guys! I thing all of you saw Usersystem made by Cannonball [https://forum.multitheftauto.com/viewtopic.php?f=108&t=27549&start=30&st=0&sk=t&sd=a&hilit=message]. I tried to run it on my server but get failed, don't know why... Here i've posted some screens with my errors: Console errors: Chat message: I think that problem in CFG file where i should change red lines: --//// Cannonball's Extended usersystem! ////-- --//// Fully MySQL based. ////-- --//// This script may not be shared under any circumstance's. ////-- --//// Copyrights ©Cannonball ////-- --//// Coded by Cannonball ////-- local host = "[color=#BF0000]localhost[/color]" local user = "[color=#BF0000]name[/color]" local password = "[color=#BF0000]password[/color]" local database = "[color=#BF0000]basename[/color]" connect_mysql = mysql_connect(host, user, password, database ) if not connect_mysql then outputChatBox( no_connect_sql_message ) end I changed lines to this like: --//// Cannonball's Extended usersystem! ////-- --//// Fully MySQL based. ////-- --//// This script may not be shared under any circumstance's. ////-- --//// Copyrights ©Cannonball ////-- --//// Coded by Cannonball ////-- local host = "localhost" local user = "root" local password = "mypass" local database = "mtadatabase" connect_mysql = mysql_connect(host, user, password, database ) if not connect_mysql then outputChatBox( no_connect_sql_message ) end But when im joining server as an admin and trying to start this resource it getting failed. You can see result at the pictures, posted at hte start of this topic. QUESTION: Why it won't work?!!? P.S. database is installed.
-
Sorry... I'll remember it. ---------------------------------------------------------- Guys, i tried to do like varez told me to do. I've added line: if (getElementType(element)=="player") and now my script looks like that: agate1 = createObject ( 988, -1972.7886962891, 293.92767333984, 35.171875, 0, 0, 90 ) acol = createColCuboid ( -1975.0732373047, 290.97298681641, 35.171875, 5, 7, 3) function opena51gates(thePlayer) if ( getElementType ( element ) == "player" ) then moveObject (agate1, 3000, -1972.7886962891, 303.92767333984, 35.171875 ) end end addEventHandler( "onColShapeHit", acol, opena51gates ) function closea51gates(thePlayer) if ( getElementType ( elemen t) == "player" ) then moveObject (agate1, 3000, -1972.7886962891, 293.92767333984, 35.171875 ) end end addEventHandler( "onColShapeLeave", acol, closea51gates ) But it won't work! Why? What have i did wrong?
-
Problem! I'm going to create server with script "Zday", and when zombies came up to gates, they're opening for them too. How make that gates will open for players only!?
-
I "killed" this problem using ColCuboid. Probably, "gates" did not work, becouse landscape wasn't equal =)
-
nice resource =), but i want to understand what im doing wrong!?! i've tested a lot mine script and understood that problem in Colshape. Mb i doing something wrong when im getting cordinates for colshape zone? How i'm getting cordinates: Im standing in front of my gates. Then copypasting cordinates to lua script. After reloading gates sdanding where they must be, but hwen im going to colshape zone nothing happen =( WHY!?
-
strange.... dont work
-
here is it .lua: function replaceModel() txd = engineLoadTXD("[color=#FF0000]carname.txd[/color]", 560 ) engineImportTXD(txd, 560) dff = engineLoadDFF("[color=#FF0000]carname.dff[/color]", 560 ) engineReplaceModel(dff, 560) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) addCommandHandler ( "reloadcar", replaceModel ) meta.xml <meta> <info author="*sTx*" name="Race" version="1.0.0" type="script"/> <script src="[color=#FF0000]CAR.lua[/color]" type="client"/> <file src="[color=#FF0000]carname.txd[/color]" type="client"/> <file src="[color=#FF0000]carname.dff[/color]" type="client"/> </meta> all, what i drawed in a red you must change to yours. in archive (.zip) you must place .lua meta.xml and .txd\.dff files. That's all. =)
-
Guys, post someone script with automaticly gate opening/closing, or tell me what's wrong with my script, please!
-
i know that =) but problem still exist. i can't make them automaticly open\close
-
Hello guys. I'm newbe in scripting, so i need your help a bit... The problem consists in that i cant force my gate moving, when someone coming up to them. The idea in that this gate should move away when someone coming to them nearer (i don't know how this "number" named... it set in script to 3. Looks like a51col = createColCircle ( 213.94564819336, 1875.40234375, 13.938992500305, 3 ) ) doors must open up, and when someone going away it's closing. I tried to made script by myself, because i didn't this resource. I tried to make it script. Here is original script: a51gate1 = createObject ( 2929, 215.99548339844, 1875.40234375, 13.938992500305, 0, 0, 0 ) a51gate2 = createObject ( 2929, 211.94564819336, 1875.40234375, 13.938992500305, 0, 0, 0 ) a51col = createColCircle ( 213.94564819336, 1875.40234375, 13.938992500305, 7 ) function opena51gates(thePlayer) if getElementModel( thePlayer ) == 287 then moveObject (a51gate1, 5000, 218.99548339844, 1875.40234375, 13.938992500305 ) moveObject (a51gate2, 5000, 208.94564819336, 1875.40234375, 13.938992500305 ) end end addEventHandler( "onColShapeHit", a51col, opena51gates ) function closea51gates(thePlayer) if getElementModel( thePlayer ) == 287 then moveObject (a51gate1, 5000, 215.99548339844, 1875.40234375, 13.938992500305 ) moveObject (a51gate2, 5000, 211.94564819336, 1875.40234375, 13.938992500305 ) end end addEventHandler( "onColShapeLeave", a51col, closea51gates ) i've deleted this lines: a51gate2 = createObject ( 2929, 211.94564819336, 1875.40234375, 13.938992500305, 0, 0, 0 ) moveObject (a51gate2, 5000, 208.94564819336, 1875.40234375, 13.938992500305 ) moveObject (a51gate2, 5000, 211.94564819336, 1875.40234375, 13.938992500305 ) then i renamed a51gate2 to a1gate everywhere, and tested. It has worked! BUT!!!!!!!!! when i changed lines of cordinates to what i wanted - work stoped. Here is my script: a1gate = createObject ( 2929, 215.99548339844, 1875.40234375, 13.938992500305, 0, 0, 0 ) a51col = createColCircle ( 213.94564819336, 1875.40234375, 13.938992500305, 3 ) function opena1gate(thePlayer) moveObject (a1gate, 5000, 218.99548339844, 1875.40234375, 13.938992500305 ) end addEventHandler( "onColShapeHit", a51col, opena1gate ) function closea1gate(thePlayer) moveObject (a1gate, 5000, 215.99548339844, 1875.40234375, 13.938992500305 ) end addEventHandler( "onColShapeLeave", a51col, closea1gate ) Where have i made a mistake? What is wrong? Correct me, please... P.S. createColCircle cordinated i changed too.