-
Posts
1,312 -
Joined
-
Last visited
Everything posted by KariiiM
-
turf payout cash to clan bank Already i solved this ? in your preview topic
-
What do you want to make?
-
How can we know? post the error of debugscript
-
Search for it in the community resources first , HERE.
-
Can you explain more clear and use /debugscript 3 to check the errors in game it would be easy to find and solve the problem as i understood, you created a button in the main GUI defined as "window", if you clicked in it you want the main window be invisible and show new GUI
-
table.insert This function is used to inserts element in table and in this situation you need to store player position what you typed in game You can also use, table.remove to remove what you stored in the table
-
Maybe there's another way to use it but you can use GTA SA in android i know a friend bought it and using it
-
table.insert Also you've to use this function to get the player's position when you type the cmd getElementPosition
-
Use file or XML they're the easy way to store data like logs ..etc
-
You're welcome ,so your problem is solved or still need help?
-
Hey, does alpha is defined? it's a full code or part of , if yes then i fixed your code function createMarkerG6(hitElement, matchingDimension) if getElementType(hitElement) =="player" and getPlayerTeam(hitElement) and getTeamName (getPlayerTeam(hitElement)) == "German" then triggerClientEvent ( hitElement,"CreateVshop_g",hitElement ) else outputChatBox("You can't buy form the enemys shop!",hitElement,255,50 ,50 ) end end addEventHandler("onResourceStart", resourceRoot, function () if isElement(UA6) then destroyElement ( UA6 ) end if isElement(markerA6) then destroyElement ( markerA6 ) end GA6 = createRadarArea ( -1220, -1165, 250, 300, 40, 40, 40, alpha ) local markerG6 = createMarker ( -1082.77, -1173.14, 128, "cylinder", 3, 255, 255, 0, 170 ) addEventHandler("onMarkerHit", markerG6, createMarkerG6) end)
-
hhh lol You look like you won't learn, you always need someone to edit for you codes?
-
I re-made the script from the Zero, it's without bugs and clear i just tested it , works perfectly there are two sides , server / client, copy them correctly and i hope that i helped you, have fun scripting ! --client side local w, h = 400, 250 local window = guiCreateWindow(0, 0, w, h, "Admin Teleporter © Almighty", false) guiSetVisible (window, false) guiWindowSetSizable(window,false) local grid = guiCreateGridList(10, 23, 380, 172, false, window) local col1 = guiGridListAddColumn(grid,"ID",0.4) local col2 = guiGridListAddColumn(grid,"Name",0.37) local col3 = guiGridListAddColumn(grid,"Description",0.13) local transport = guiCreateButton(5, 205, 91, 35, "Go", false, window) local cancel = guiCreateButton(299, 205, 91, 35, "Close", false, window) function viewGUI (aTable) if ( source == getLocalPlayer() ) then guiSetVisible (window, true) showCursor (true) if guiGetVisible(window) then guiGridListClear(grid) for index ,val in ipairs (aTable) do local row = guiGridListAddRow (grid) guiGridListSetItemText (grid, row, col1, val[1], false, true) guiGridListSetItemText (grid, row, col2, val[2], false, false) guiGridListSetItemText (grid, row, col3, val[3], false, false) end end end end addEvent ("showGui", true) addEventHandler ("showGui", root, viewGUI) addEventHandler ("onClientGUIClick", root, function () if (source == cancel) then if guiGetVisible(window) ~= nil then guiSetVisible (window, false) showCursor(false) end elseif (source == transport) then local row = guiGridListGetSelectedItem(grid) if row and row == -1 then outputChatBox ("You must selecte the destination",getLocalPlayer(),255,0,0) return false end guiSetVisible(window,false) showCursor(false) triggerServerEvent("warp",getLocalPlayer(),guiGridListGetSelectedItem(grid)+1) end end) --server side: --X, Y, Z, Int, Dim, Rot; local data = { [1] = {"1", "Los Santos", "Teleports you to Pershing Square, Los Santos.", 1479.9873046875, -1710.9453125, 13.36874961853, 0, 0, 0}, [2] = {"2", "San Fierro", "Teleports you to Doherty, San Fierro.", -1988.5693359375, 507.0029296875, 35.171875, 0, 0, 90}, [3] = {"3", "Las Venturas", "Teleports you to The Strip, Las Venturas", 1691.6801757813, 1449.1293945313, 10.765375, 0, 0, 268}, } addCommandHandler("tpmenu", function (player, commandName) triggerClientEvent (player,"showGui", player, data) end) addEvent ("warp",true) addEventHandler ("warp",root, function (i) local data = data[i] local x, y, z = data[4], data[5], data[6] local int , dim = data[7], data[8] fadeCamera(source, false) setTimer(fadeCamera, 2200, 1, source, true) setTimer(setElementPosition,2000,1,source, x, y, z) setTimer(setElementDimension,2000,1,source, dim) setTimer(setElementInterior,2000,1,source, int) setCameraTarget(source, source) end) --meta.xml "KariM" type="script" name="Transporter GUI" version="1.0" /> ~Regards, KariM
-
Yes, im making it now, 5mins and the code will be done with all features and clear !
-
Do you want only staff team or someone in the ACL who control it? im going to re make this code , it's really messy , you can learn from it later
-
Your code is messy, post the full code and i'll fix it
-
You've to use setElementPosition try by yourself if you stuck i will help you
-
Make sure gui.grid is defined as guiCreateGridList function and gui.colID ,gui.colValue, gui.colDesc are the columns local data = { -- X Y Z Int Dim Rot [1] = {"1", "Los Santos", "Teleports you to Pershing Square, Los Santos.", 1479.9873046875, -1710.9453125, 13.36874961853, 0, 0, 0}, [2] = {"2", "San Fierro", "Teleports you to Doherty, San Fierro.", -1988.5693359375, 507.0029296875, 35.171875, 0, 0, 90}, [3] = {"3", "Las Venturas", "Teleports you to The Strip, Las Venturas", 1691.6801757813, 1449.1293945313, 10.765375, 0, 0, 268}, } for index, v in pairs(data) do local row = guiGridListAddRow(gui.grid) guiGridListSetItemText(gui.grid, row, gui.colID, v[1], false, true) guiGridListSetItemText(gui.grid, row, gui.colValue, v[2], false, false) guiGridListSetItemText(gui.grid, row, gui.colDesc, v[3], false, false) end
-
Good job, but It's wrong must be like that local data = { {"1", "Los Santos", "Pershing Square, the heart of Los Santos."}, {"2", "DMV", "Department of Motor Vehicles."}, } If you stuck on something post the code, ~Good luck
-
He saw it here and yeah it's GTA SA android
-
You can create a table like that local aTable = {} --i created my table i named it aTable it's empty local aTable = { --after creating the table i filled it with IDs. {"id1"}, {"id2"}, {"id3"}, } There're alot of ways to do that ,it was just a simple example to understand, You can loop like this table by using ipairs or pairs no matter in this situation
-
Create a table and loop the data from this table and send it to client side by trigger ,in case you created the table in client just loop it Use ipairs pairs to loop a table