
Absence2
Members-
Posts
267 -
Joined
-
Last visited
Everything posted by Absence2
-
once you post it here, it's basically open for everyone, unless you FORCE the people who helped you to delete theirs and aswell as you delete yours. (posts containing scripts)
-
how do you want it to be then?
-
this one includes a turf system and people didn't stop after making the first TV in the world. If you know what I'm saying. Can always improve. And I'm not in favor of compiled resources. I just don't use them, can't edit crap myself and then it ends up being 250 servers with the same resource / system which is pure bullcrap. Nontheless, Castillo's resource is good. It lacks a few features, like deleting gangs IG. From what I know, you can only delete via sqlite or w.e it is, I don't remember
-
Plus we're still developing SA and trying to fix all the bugs and add more options for a better MP Experience... but if we start with GTA V, then the MTA MP for V wont be finished until... probably a year. we we we we why do you keep saying 'we', you are not developing anything The features they have mostly came from us, but it's ok, I wanted to see GTA San Andreas like that WHAT? so you are saying a multi-player modification did NOT copy R* but they are copying MTA? WHAT?! R* can do what the hell they want, MTA is based on GTA. Not the other way around. Every idea and possibility is from the single player mode. like you said: Plus we're still developing SA Plus we're still developing SA Plus we're still developing SA there's still many features lacking and even saying R* is copying MTA whose based on a game developed by THEM is pure stupidity
-
https://wiki.multitheftauto.com/wiki/GetRootElement https://wiki.multitheftauto.com/wiki/SetElementData you can't set the element's data on serverside then 'get' it on clientside. you have to use one of these https://wiki.multitheftauto.com/wiki/TriggerServerEvent https://wiki.multitheftauto.com/wiki/TriggerClientEvent
-
useless function, but one smart thing to do is to color every second server shown in the browser, it's something most chat system uses to make things easier to read. like message by : blablabla message by : blablabla message by : blablabla message by : blablabla message by : blablabla message by : blablabla italic text on every third server message by : blablabla message by : blablabla message by : blablabla message by : blablabla message by : blablabla message by : blablabla And a real example: -sTs- RACE DM/DD RACE SERVER ||eTe Roleplay|| Los Santos || stsroleplay.com || Freeroam (IDK WHAT THESE SERVERS DO), http://www.wefreeroamhardcore.com ||tSt RPG|| Las Venturas || cops, criminals, medics, army || -wWw- race server 24/7 DM/DD pro maps zZz || minigames || cs mta || gungames || all kinda crap || note that all servers are fake, i hope. because it's terrible names and they don't mean shit! : ) just a small suggestion, more user-friendly edit: another way is to highlight popular servers, above 50~ players? with bold text
-
glad i could help
-
isTransferBoxActive -- click this?
-
ok, now what is getRandomLocation
-
why do you need getElementPosition ? you need it to check the CURRENT location of the player?
-
http://lua-users.org/wiki/TablesTutorial > t = { apple="green", orange="orange", banana="yellow" } > for k,v in pairs(t) do print(k,v) end apple green orange orange banana yellow > t.melon = "green" > t["strawberry"] = "red" > for k,v in pairs(t) do print(k,v) end melon green strawberry red apple green orange orange banana yellow _____________________________________________________________ > t = { 2,4,6, language="Lua", version="5.1" } > for k,v in pairs(t) do print(k,v) end 1 2 version 5.1 3 6 language Lua 2 4 > for i,v in ipairs(t) do print(i,v) end 1 2 2 4 3 6
-
no it isn't, first of all, that code will never work. it's a complete mess, including syntax errors. read this (from wiki) function planeEnter ( theVehicle, seat, jacked ) -- when someone enters a vehicle local id = getElementModel ( theVehicle ) -- get the model ID of the vehicle if id == 519 or id == 577 then -- if theVehicle is either Shamal or AT-400 local vehicleName = getVehicleName ( theVehicle ) -- get the name of theVehicle outputChatBox ( "Someone stole a " .. vehicleName .. "!" ) -- announce that someone stole the plane end end -- add the event handler to the event addEventHandler ( "onPlayerVehicleEnter", getRootElement(), planeEnter )
-
and what do you want to do with that
-
https://wiki.multitheftauto.com/wiki/OnC ... hicleEnter this?
-
^ https://wiki.multitheftauto.com/wiki/GetAlivePlayers
-
http://code.google.com/p/mtasa-blue/sou ... ail?r=3725 http://code.google.com/p/mtasa-blue/sou ... ail?r=3725 http://code.google.com/p/mtasa-blue/sou ... ail?r=3725 http://code.google.com/p/mtasa-blue/sou ... ail?r=3725 http://code.google.com/p/mtasa-blue/sou ... ail?r=3725 isn't that enough for you?
-
jayz changed it to 'ipairs' not you, i think anyhow, post your code. using jayz's code should work, but a fixed verison. -- server addEvent ( 'objcrt', true ); addEventHandler ( 'objcrt', root, function ( chk ) outputChatBox ( tostring ( chk ) ); -- check here what outputs -- following arguments with source and not thePlayer toggleAllControls ( source, false ); -- source showCursor ( source, false ); -- source local nX, nY, nZ = getElementPosition ( source ); -- source local nX2, nY2, nZ3 = getElementRotation ( source ); -- source if ( chk == 0 ) then rbobj = createObject(1459, nX, nY, nZ-0.5, nX2, nY2, nZ2); elseif ( chk == 1 ) then rbobj = createObject(1424, nX, nY, nZ-0.5, nX2, nY2, nZ2); elseif ( chk == 2 ) then rbobj = createObject(1425, nX, nY, nZ-0.5, nX2, nY2, nZ2); elseif ( chk == 3 ) then rbobj = createObject(1423, nX, nY, nZ-0.2, nX2, nY2, nZ2); elseif chk == 4 then rbobj = createObject(981, nX, nY, nZ-0.5, nX2, nY2, nZ2); elseif chk == 5 then rbobj = createObject(978, nX, nY, nZ-0.5, nX2, nY2, nZ2); end end ) local tRBNames = { [ 'roadright' ] = 'Small roadblock'; [ 'helix_barrier' ] = 'Big Street Roadblock'; [ 'roadworkbarrier1' ] = 'Sidewalk Roadblock'; [ 'roadbarrier4' ] = 'Barrier'; [ 'roadbarrier3' ] = 'Detour sign'; [ 'roadbarrier6' ] = 'Small barrier'; } function cGUI() showCursor(true) toggleAllControls(true) rbsWindow = guiCreateWindow(0.3391,0.2832,0.3125,0.4688,"Roadblock System",true) guiWindowSetSizable(rbsWindow,false) acceptButton = guiCreateButton(0.1075,0.8813,0.3225,0.0854,"Accept",true,rbsWindow) closeButton = guiCreateButton(0.57,0.8813,0.3225,0.0854,"Close",true,rbsWindow) rbsMenu = guiCreateGridList(0.11,0.1292,0.785,0.725,true,rbsWindow) guiGridListSetSelectionMode(rbsMenu,2) guiGridListAddColumn(rbsMenu,"Roadblocks",0.90) for _, sObject in pairs ( tRBNames ) do -- pairs, not ipairs if ( rbsMenu ) then local row = guiGridListAddRow ( rbsMenu ) guiGridListSetItemText ( rbsMenu, row, 1, tostring ( sObject ), false, false ) end end addEventHandler("onClientGUIClick", root, function ( ) if ( source == acceptButton ) then local chk = guiGridListGetSelectedItem ( rbsMenu ) if ( chk ) then triggerServerEvent("objcrt", localPlayer, chk) --localPlayer, not root guiSetVisible(rbsWindow, false) end elseif ( source == closeButton ) then guiSetVisible(rbsWindow, false) toggleAllControls(true) showCursor(false) end end ) end addCommandHandler ( 'rb', cGUI ) and yours: --client rbnames = { ["roadright"] = "Small roadblock", ["helix_barrier"] = "Big Street Roadblock", ["roadworkbarrier1"] = "Sidewalk Roadblock", ["roadbarrier4"] = "Barrier", ["roadbarrier3"] = "Detour sign", ["roadbarrier6"] = "Small barrier" } function cGUI() showCursor(true) toggleAllControls(true) rbsWindow = guiCreateWindow(0.3391,0.2832,0.3125,0.4688,"Roadblock System",true) guiWindowSetSizable(rbsWindow,false) acceptButton = guiCreateButton(0.1075,0.8813,0.3225,0.0854,"Accept",true,rbsWindow) closeButton = guiCreateButton(0.57,0.8813,0.3225,0.0854,"Close",true,rbsWindow) rbsMenu = guiCreateGridList(0.11,0.1292,0.785,0.725,true,rbsWindow) guiGridListSetSelectionMode(rbsMenu,2) guiGridListAddColumn(rbsMenu,"Roadblocks",0.90) addEventHandler("onClientGUIClick", acceptButton, function () chk = guiGridListGetSelectedItem ( rbsMenu ) if chk then triggerServerEvent("objcrt", localPlayer, chk) -- localPlayer, not root guiSetVisible(rbsWindow, false) end end ) addEventHandler("onClientGUIClick", closeButton, function () guiSetVisible(rbsWindow, false) toggleAllControls(true) showCursor(false) end) guiGridListAddColumn(rbsMenu,"Roadblocks",0.90) for key,rbnames in pairs(rbnames) do local row = guiGridListAddRow ( rbsMenu ) guiGridListSetItemText ( rbsMenu, row, 1, rbnames, false, false ) end for i = 1, 6 do guiGridListAddRow(rbsMenu) end end addCommandHandler("rb", cGUI) --server function cobjs(chk) --source all of 'em, not thePlayer outputChatBox(chk) toggleAllControls( source, false ) showCursor( source, false ) x, y, z = getElementPosition( source ) rx, ry, rz = getElementRotation( source ) if chk == 0 then rbobj = createObject(1459, x, y, z-0.5, rx, ry, rz) elseif chk == 1 then rbobj = createObject(1424, x, y, z-0.5, rx, ry, rz) elseif chk == 2 then rbobj = createObject(1425, x, y, z-0.5, rx, ry, rz) elseif chk == 3 then rbobj = createObject(1423, x, y, z-0.2, rx, ry, rz) elseif chk == 4 then rbobj = createObject(981, x, y, z-0.5, rx, ry, rz) elseif chk == 5 then rbobj = createObject(978, x, y, z-0.5, rx, ry, rz) end end addEvent("objcrt", true) addEventHandler("objcrt", root, cobjs)
-
pairs ipairs you changed it to 'ipairs', it will just ruin things even more than they aldready are. try again this is what you have to do: you had 'root'. triggerServerEvent("objcrt", localPlayer, chk) Read this (It's from wiki): function greetingCommand ( commandName ) triggerServerEvent ( "onGreeting", getLocalPlayer(), "Hello World!" ) -- getLocalPlayer instead of getRootElement makes the client player the 'source' on the server function, eliminating the need for an additional player argument to be transferred. end addCommandHandler ( "greet", greetingCommand ) and now when you changed 'root' to 'localPlayer', you need to change 'thePlayer' to 'source' on the serverside, as it says in the example. It's really simple.
-
yes, it's not on a fitting place because you've missed something, most likely an 'end'. function () chk = guiGridListGetSelectedItem ( rbsMenu ) if chk then triggerServerEvent("objcrt", root, chk) guiSetVisible(rbsWindow, false) end end) addEventHandler("onClientGUIClick", closeButton, one function needs one 'end' with this: if chk then another 'end' is needed, else it will output syntax error idk how to explain it, but everytime there's an 'if', there's an extra 'end'. Pretty simple
-
you had syntax error in clientside either use /debugscript 3 or http://www.lua.org/cgi-bin/demo to search for them or: magic spoiler again: (incase you can't find them)
-
syntax error, line 36. rbobj = createObject(1424 x, y, z, rx, ry, rz) missed a comma