
bandi94
Members-
Posts
1,037 -
Joined
-
Last visited
Everything posted by bandi94
-
You are replacing only the .DFF , where is the .TXD ? You need to replace both
-
1. number "5" is just an exampel , "return" can return everything from a number , tabel , string , ...... 2. nope it's not possible "return" alone like in your code will end the whole "AntiSpam" function , it will not return to "if messageType == 0..". "return" can return arguments only for another function from where the current function was called like i showed to you , and not to the function is in it. I think you miss understand "return" function. "return" function can return only arguments stored like : tableA = {} return tableA local number = "5" return number local stringA = "Test" return stringA and not to commands like "if"
-
Type 1 function getNumber() local number = functionReturn() outputChatBox(number) end function functionReturn() return 5 -- this will return argument "5" to his parent in this case is "function getNumber()" and it will outputChatBox 5 . end Type 2 function Nothing() --code blablabla return -- in this case the parent is "nil" bk this function was not called from another function like in "Type 1" so this will return to the RootNode witch is actually the game , so this will just stop executing the code after the "return" end
-
"return" alone , jump's back to the parent , so the code after it will not be runned. "return" with an argument like : "return number" , will jump back with the argument. Like data = functionReturn() will hold the data from the argument witch was in the return , in this case the variable "number"
-
It is for 3D. I want to do the animation for a 2D Image. it is for 2D to, just set "0" on z axis and it is for 2D.
-
You don't loaded the .txd or they are bad .txd's or you loaded the .dff before the .txd
-
I hade same problem , and with the same file : " racevoting_server.lua" . On my localhost Windows server was working great. On the hosted server , ofc is Linux , the whole server was crashing in every 10 min. Well my fix was that i recoded every change of my .
-
There is more way of doing this , most used way is "Graph" way , like on that wiki page. The base of this algorithm is , : 1. Store each point-point distance , like point 1 - point 2 distance is 1km . point 2 - point 3 distance is 0.7 km , and so on for each - each point 2. get the start / end point . like you wanna go from point 3 to point 8. 3. Now you go through all possibilities and get the distance. From your image the posibilities of go are : 3-4-7-8 3-4-5-6-7-8 3-4-11-10-7-8 3-4-11-10-9-8 3-2-12-11-10-7-8 3-2-12-11-10-9-8 Now with the data of point-point distance witch you save'd you calculate the distnace for every posibility , after that you get the shortes one , and you have it.
-
Well i am developing my own gamemodes and i am forced to use "loadstring" . My qusetion is that loadstring can handel , run complied .lua / scripts , or not. THX
-
Hello. The first thing : Users , whit the "stop copy other server" please don't waste your time reading this. I am saying this bk there are plenty of them. Okey now my problem : Well , i wanna make a custom race gamemode , that will alow for every player to play on diffrent maps. So i mean player1 join the server and chose xx map , player2 join the server and he can chose and play on map xy. Well , it look's not to hard , or maybe it's the truth and it's not hard , but i got stuck. I already found in theory that seem's very real / working one , to load the .map files. So for player1 i load xx.map , for player2 i load xy.map , all good. The problem is that in time DM style changed and it's not how the Oldschool was with only .map , meta.xml file. The current 90% of DM maps have scripts most of them the 'puma script' . Now here i am stuck and i need some idea's , how could i run that scripts only for 1 player ? So for player1 i need to run the scripts from map xx , and for player2 the scripts from map xy. Well i searched over all the wiki to found a solution but nothing , i was thingking if is possbile to run that resource/script in diffrent dimension . So i would put player1 in dimension 1 and run the scripts in dim 1 in that way that player2 in dim 2 would not run the script. But i dont find anything about setting the dim for a resource/script's . Anybody has some idea's how could all this be possbile?? THX for everyone.
-
There are manny autoteams on the comunity . My one even check's ACL groups if you set them ..... Why to pay somebody to make what is already made for free ?
-
Why not just set it on the admin panel to 'random' in race settings ?
-
there is no setting's for your secound problem. You need to edit : racevoting_server.lua
-
My server is alway's crashing , in race gamemode whitout any solid error. Script's / maps were thested on home hosted server they are working how they should no crash no error. So i speak'd whit the hoster he took'd a look to and the same he don't found any solid error , only a bunch of dump files/error's. So here they are if somebody could tell me what's wrong ? THX http://depositfiles.com/folders/IJ36W23E8
-
Maybe i am on the wrong section but .... So recently i finished my modes everyhing uploaded my scripts/maps to the server and removed the pw. Not passed to long time until the problem showed itself. My server is crashing / bugging in IDK , i writed a pm to the host , let's see. So i was thinking what could be the problem , after that i noticed that the server always crash when a map is started. Last time it did when i double clicked on a map in admin panel to start it. So i am thinking that maybe is the idiot mapmanager. Now idk maybe becouse the large number of maps (900) or bk some double map's , after my server is up i will delete all double map with script. So i wanted to ask if could be the mapmanager the problem bk this 2 problems ? amount of maps / double map's ? My script's worked fine with the standar race map's , the problem started after uploaded the new maps ( 900 map's)
-
Is there any event / posibility to create one witch is triggered when there is any outputChatBox ? Here i mean including 'outputChatBox' function from resources. THX
-
well on short , you need to replace every "guiLabel" with "dxDrawText"
-
function return_Played_time(time) local h,m if time/60 >= 1 then h = math.floor(time/60) m = time - h*60 else h=0 m=time end return tostring(h.."h "..m.."m") end
-
vehicleSkins = { [425]=true, [520]=true, [432]=true } function onlyLevel15(thePlayer, seat, jacked) if tonumber(getElementData(thePlayer, "Level") ) <= 16 then if ( vehicleSkins[getElementModel(source)] ) then removePedFromVehicle ( thePlayer ) outputChatBox("You need to be atleast level 15 to be able to use this vehicle",thePlayer, 255,0,0) end end end addEventHandler("onVehicleEnter", getRootElement(), onlyLevel15)
-
function hit (collide) if collide and getElementType(collide)=="vehicle" then --check if is a vehicle , or hitted an object from the map if ( source == getPedOccupiedVehicle(getLocalPlayer()) ) then -- check if you hitted somebody setTimer(check_if_is_alive,10000,1,collide) -- timmer to 10s end end end addEventHandler("onClientVehicleCollision", root, hit) function check_if_is_alive(car) if car and getVehicleOccupant(car) and getElementData(getVehicleOccupant(car),"state") ~= "dead" then -- the hitted player is still alive return else -- the hitted player is dead so you do here your stuff's end end
-
Well you can made it on client side faster / easyer using . OnClientVehicleCollision
-
Well it has no + or - using it that way. Maybe in the function was used "player" then the EventHandler was changed then to don't change every "player" to "source" it was a quick mode to do that.
-
I never sayd only with LUA. But it's possible to make it for MTA with : Lua + php
-
Yes it is. 1. Downloading via php the webpage source. 2. Downloading all elements ( photos,buttons,etc). 3. Using a recognizer algoritm writen in LUA witch will return all elements position(x,y,w,h) from the downloaded source code (step 1) 4. Using the returned values from the algoritm you can rebuild the page with dxDraw. Still to much work after that you need to check every button,link type element , when it's clicked via PHP check that page and start the whole process from setp 1 with the new page. On short it's possible but it's a very big project , also request PHP/HTML skill's.
-
nope but you can use SQL , when somebody buy on your webpage , then add that object to a database , then the server will check that database if there is any new buy if yes , store it on accountData/ SQLite , and remove it from the webpage SQL database.