Jump to content

Walid

Members
  • Posts

    1,491
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Walid

  1. Walid

    Online GUI-Editor

    check this: Qt to Lua ( Create your MTA GUI outside of MTA )
  2. Walid

    Save

    function saveWalkStyle() local acc = getPlayerAccount(source) if acc and not isGuestAccount(acc) then local walk = getPedWalkingStyle (source) setAccountData(acc, "walkStyle", tonumber(walk)) end end addEventHandler("onPlayerQuit", root, saveWalkStyle) function loadWalkStyle(_, acc) local walk = getAccountData(acc, "wstyle") or 0 setPedWalkingStyle(source, tonumber(walk)) end addEventHandler("onPlayerLogin", root, loadWalkStyle)
  3. You are welcome, next question you need to fix it by yourself
  4. Replace skinShops[current][#skins] with #skinShops[current]["skins"] BTW many things wrong in your code.
  5. Client side (send the marker id to the server side) addEventHandler("onClientResourceStart", resourceRoot, function() for k, v in pairs(skinShops) do local skinShopBlip = createBlip(v[1], v[2], v[3], 45, 2, 0, 180, 255, 255) local skinShopMarker = createMarker(v[1], v[2], v[3], "cylinder", 1.5, 0, 180, 255, 75) setElementData(skinShopMarker, "markerID-->skinShop", v[24]) setElementDimension(skinShopMarker, v[4]) setElementInterior(skinShopMarker, v[5]) addEventHandler("onClientRender", root, function() exports.vice_util:dxDrawTextOnElement(skinShopMarker, "Ruhabolt", 1, 20, 255, 255, 255, 255, 2, "default-bold") end) addEventHandler("onClientMarkerHit", skinShopMarker, function(hitPlayer, matchingDimension) local id = getElementData(source, "markerID-->skinShop") triggerServerEvent("selectSkin", hitPlayer,id) end) end end) Server side function selectSkin (id) if getElementType(source) == "player" and not isPedInVehicle(source) and not isPedDead(source) then if id and tonumber(id) then current = id setElementFrozen ( source, true ) showCursor ( source, true ) bindKey ( source, "backspace", "down", cancelBuy ) bindKey ( source, "enter", "down", buySkin ) bindKey ( source, "arrow_l", "down", changeSkin ) bindKey ( source, "arrow_r", "down", changeSkin ) fadeCamera ( source, true ) index [source] = 1 setElementPosition ( source, skinShops[current][6], skinShops[current][7], skinShops[current][8] ) setTimer(function(player) setPedRotation ( player, skinShops[current][9] ) end, 500, 1, source) setElementDimension (source, skinShops[current][10]) setElementInterior (source, skinShops[current][11]) setCameraMatrix ( source, skinShops[current][12], skinShops[current][13], skinShops[current][14], skinShops[current][15], skinShops[current][16], skinShops[current][17] ) originalSkin = getElementModel( source ) end end end addEvent("selectSkin", true) addEventHandler("selectSkin", root, selectSkin) BTW you can use the table index instead of v[24].
  6. Walid

    Question

    Use my useful function removeHex
  7. Lol --[[------------------------------------------------- Notes: > This code is using a relative image filepath. This will only work as long as the location it is from always exists, and the resource it is part of is running. To ensure it does not break, it is highly encouraged to move images into your local resource and reference them there. --]]------------------------------------------------- GUIEditor = { tab = {}, staticimage = {}, tabpanel = {}, edit = {}, button = {}, window = {}, gridlist = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(0.19, 0.14, 0.62, 0.61, "Panou donati - Romania Wasted Roleplay ", true) guiWindowSetMovable(GUIEditor.window[1], false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF29FB00") GUIEditor.edit[1] = guiCreateEdit(0.70, 0.88, 0.29, 0.07, "ori Alex Wizz!Doar PaySafeCard!", true, GUIEditor.window[1]) guiSetProperty(GUIEditor.edit[1], "NormalTextColour", "FFFE0000") guiEditSetReadOnly(GUIEditor.edit[1], true) GUIEditor.edit[2] = guiCreateEdit(0.70, 0.79, 0.29, 0.09, "Donatile se fac decat la Paul Dima", true, GUIEditor.window[1]) guiSetProperty(GUIEditor.edit[2], "NormalTextColour", "FFFE0000") guiEditSetReadOnly(GUIEditor.edit[2], true) GUIEditor.tabpanel[1] = guiCreateTabPanel(13, 36, 469, 477, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Vehicule Donator", GUIEditor.tabpanel[1]) GUIEditor.gridlist[1] = guiCreateGridList(0.01, 0.01, 0.97, 0.96, true, GUIEditor.tab[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Vehicul", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "Pret(Euro)", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "Viteza(km/h)", 0.3) for i = 1, 5 do guiGridListAddRow(GUIEditor.gridlist[1]) end guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "Infernus", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 0, 2, "5", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 0, 3, "250", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "Bullet", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 2, "5", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 3, "240", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "Hotring Race", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 2, 2, "3", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 2, 3, "200", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 3, 1, "Hotring Race 3", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 3, 2, "3", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 3, 3, "205", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 4, 1, "Bus", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 4, 2, "2", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 4, 3, "100", false, false) GUIEditor.tab[2] = guiCreateTab("Case Donator", GUIEditor.tabpanel[1]) GUIEditor.gridlist[2] = guiCreateGridList(0.01, 0.01, 0.96, 0.97, true, GUIEditor.tab[2]) guiGridListAddColumn(GUIEditor.gridlist[2], "Locatie", 0.2) guiGridListAddColumn(GUIEditor.gridlist[2], "+gate", 0.2) guiGridListAddColumn(GUIEditor.gridlist[2], "gate ", 0.2) guiGridListAddColumn(GUIEditor.gridlist[2], "Marime", 0.2) for i = 1, 6 do guiGridListAddRow(GUIEditor.gridlist[2]) end guiGridListSetItemText(GUIEditor.gridlist[2], 0, 1, "Las Venturas", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 0, 2, "10", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 0, 3, "da", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 0, 4, "Mare", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 1, 1, "Las Venturas", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 1, 2, "5", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 1, 3, "nu", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 1, 4, "Mic", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 2, 1, "Los Santos", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 2, 2, "10", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 2, 3, "da", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 2, 4, "Mare", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 3, 1, "Los Santos", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 3, 2, "7", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 3, 3, "da", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 3, 4, "Medium", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 4, 1, "Los Santos", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 4, 2, "5", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 4, 3, "nu", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 4, 4, "Mic", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 5, 1, "La alegere", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 5, 2, "15", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 5, 3, "La alegere", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 5, 4, "La alegere", false, false) GUIEditor.tab[3] = guiCreateTab("Bonus Donator", GUIEditor.tabpanel[1]) GUIEditor.gridlist[3] = guiCreateGridList(0.01, 0.01, 0.97, 0.97, true, GUIEditor.tab[3]) guiGridListAddColumn(GUIEditor.gridlist[3], "Nume Bonus", 0.5) guiGridListAddColumn(GUIEditor.gridlist[3], "Pret(Euro)", 0.5) for i = 1, 6 do guiGridListAddRow(GUIEditor.gridlist[3]) end guiGridListSetItemText(GUIEditor.gridlist[3], 0, 1, "Nitro x5", false, false) guiGridListSetItemText(GUIEditor.gridlist[3], 0, 2, "1", false, false) guiGridListSetItemText(GUIEditor.gridlist[3], 1, 1, "Nitro x10", false, false) guiGridListSetItemText(GUIEditor.gridlist[3], 1, 2, "2", false, false) guiGridListSetItemText(GUIEditor.gridlist[3], 2, 1, "500.000 lei in joc", false, false) guiGridListSetItemText(GUIEditor.gridlist[3], 2, 2, "1", false, false) guiGridListSetItemText(GUIEditor.gridlist[3], 3, 1, "Mobila Donator", false, false) guiGridListSetItemText(GUIEditor.gridlist[3], 3, 2, "1", false, false) guiGridListSetItemText(GUIEditor.gridlist[3], 4, 1, "Chat de donator", false, false) guiGridListSetItemText(GUIEditor.gridlist[3], 4, 2, "1", false, false) guiGridListSetItemText(GUIEditor.gridlist[3], 5, 1, "Nume de donator", false, false) guiGridListSetItemText(GUIEditor.gridlist[3], 5, 2, "1", false, false) GUIEditor.tab[4] = guiCreateTab("Regulament Donator", GUIEditor.tabpanel[1]) GUIEditor.edit[3] = guiCreateEdit(9, 9, 450, 26, "Dragi jucatori/donatori , daca cumva ati donat pe server sau doriti sa o faceti", false, GUIEditor.tab[4]) guiEditSetReadOnly(GUIEditor.edit[3], true) GUIEditor.edit[4] = guiCreateEdit(9, 40, 450, 26, "trebuie sa respectati un regulament , si anume acesta , aveti mai jos niste", false, GUIEditor.tab[4]) guiEditSetReadOnly(GUIEditor.edit[4], true) GUIEditor.edit[5] = guiCreateEdit(9, 71, 65, 26, "reguli.", false, GUIEditor.tab[4]) guiEditSetReadOnly(GUIEditor.edit[5], true) GUIEditor.edit[6] = guiCreateEdit(9, 102, 450, 26, "Daca ati donat asta nu inseamna ca va permiteti sa amenintati jucatori sau", false, GUIEditor.tab[4]) guiEditSetReadOnly(GUIEditor.edit[6], true) GUIEditor.edit[7] = guiCreateEdit(9, 134, 450, 26, "sa luati peste picior staff-ul.Nu aveti voie sa va dati contul la alti jucatori .", false, GUIEditor.tab[4]) guiEditSetReadOnly(GUIEditor.edit[7], true) GUIEditor.staticimage[1] = guiCreateStaticImage(525, 22, 57, 75, ":guieditor/images/dx_elements/radio_button.png", false, GUIEditor.tab[4]) GUIEditor.edit[8] = guiCreateEdit(9, 170, 450, 26, "In caz ca va pierdeti cont-ul , trebuie sa faceti o cerere pe pagina de FB", false, GUIEditor.tab[4]) guiEditSetReadOnly(GUIEditor.edit[8], true) GUIEditor.edit[9] = guiCreateEdit(9, 206, 450, 26, "a serverului, si sa va prezentati cu niste dovezi si numele contului.(de retinut", false, GUIEditor.tab[4]) guiEditSetReadOnly(GUIEditor.edit[9], true) GUIEditor.edit[10] = guiCreateEdit(10, 242, 450, 26, "contul v-a fi sters definitiv si toate item-ele se vor muta pe contul nou)", false, GUIEditor.tab[4]) guiEditSetReadOnly(GUIEditor.edit[10], true) GUIEditor.edit[11] = guiCreateEdit(9, 278, 450, 26, "Cu toate ca ati donat pe server , la 3 abateri primiti remove la functie,", false, GUIEditor.tab[4]) guiEditSetReadOnly(GUIEditor.edit[11], true) GUIEditor.edit[12] = guiCreateEdit(9, 314, 450, 26, "asa ca aveti grija cum si ce faceti.Prin abateri ne referim la :", false, GUIEditor.tab[4]) guiEditSetReadOnly(GUIEditor.edit[12], true) GUIEditor.edit[13] = guiCreateEdit(9, 350, 450, 26, "Amenintare playeri, abuz, jicniri staff,atitudine de imatur , etc.", false, GUIEditor.tab[4]) guiEditSetReadOnly(GUIEditor.edit[13], true) GUIEditor.edit[14] = guiCreateEdit(9, 386, 450, 26, "Cu respect Fondatori serverului , Paul Dima si Alex Wizz!", false, GUIEditor.tab[4]) guiSetProperty(GUIEditor.edit[14], "NormalTextColour", "FF4700FD") guiEditSetReadOnly(GUIEditor.edit[14], true) GUIEditor.tabpanel[2] = guiCreateTabPanel(491, 38, 210, 380, false, GUIEditor.window[1]) GUIEditor.tab[5] = guiCreateTab("Grade", GUIEditor.tabpanel[2]) GUIEditor.gridlist[4] = guiCreateGridList(6, 7, 200, 344, false, GUIEditor.tab[5]) guiGridListAddColumn(GUIEditor.gridlist[4], "Grad", 0.5) guiGridListAddColumn(GUIEditor.gridlist[4], "Pret(Euro)", 0.5) for i = 1, 5 do guiGridListAddRow(GUIEditor.gridlist[4]) end guiGridListSetItemText(GUIEditor.gridlist[4], 0, 1, "Helper", false, false) guiGridListSetItemText(GUIEditor.gridlist[4], 0, 2, "5+test", false, false) guiGridListSetItemText(GUIEditor.gridlist[4], 1, 1, "Admin 1", false, false) guiGridListSetItemText(GUIEditor.gridlist[4], 1, 2, "10", false, false) guiGridListSetItemText(GUIEditor.gridlist[4], 2, 1, "Admin 2", false, false) guiGridListSetItemText(GUIEditor.gridlist[4], 2, 2, "15", false, false) guiGridListSetItemText(GUIEditor.gridlist[4], 3, 1, "Moderator in probe", false, false) guiGridListSetItemText(GUIEditor.gridlist[4], 3, 2, "20", false, false) guiGridListSetItemText(GUIEditor.gridlist[4], 4, 1, "Moderator", false, false) guiGridListSetItemText(GUIEditor.gridlist[4], 4, 2, "25", false, false) GUIEditor.tab[6] = guiCreateTab("Anunt grade", GUIEditor.tabpanel[2]) GUIEditor.edit[15] = guiCreateEdit(5, 10, 195, 30, "Acelasi regulament se aplica si", false, GUIEditor.tab[6]) guiSetProperty(GUIEditor.edit[15], "NormalTextColour", "FFFD0000") guiEditSetReadOnly(GUIEditor.edit[15], true) GUIEditor.edit[16] = guiCreateEdit(5, 50, 195, 30, "la STAFF , in caz ca abuzati,", false, GUIEditor.tab[6]) guiSetProperty(GUIEditor.edit[16], "NormalTextColour", "FFFD0000") guiEditSetReadOnly(GUIEditor.edit[16], true) GUIEditor.edit[17] = guiCreateEdit(5, 90, 195, 30, "jigniti jucatori/staff-ul intentionat", false, GUIEditor.tab[6]) guiSetProperty(GUIEditor.edit[17], "NormalTextColour", "FFFD0000") guiEditSetReadOnly(GUIEditor.edit[17], true) GUIEditor.edit[18] = guiCreateEdit(5, 130, 195, 30, "etc.. Riscati sa va pierdeti grad-ul", false, GUIEditor.tab[6]) guiSetProperty(GUIEditor.edit[18], "NormalTextColour", "FFFD0000") guiEditSetReadOnly(GUIEditor.edit[18], true) GUIEditor.edit[19] = guiCreateEdit(5, 170, 195, 30, "si in caz ca faceti prostioare grave", false, GUIEditor.tab[6]) guiSetProperty(GUIEditor.edit[19], "NormalTextColour", "FFFD0000") guiEditSetReadOnly(GUIEditor.edit[19], true) GUIEditor.edit[20] = guiCreateEdit(5, 210, 195, 30, "riscati si BAN PERMANENT!", false, GUIEditor.tab[6]) guiSetProperty(GUIEditor.edit[20], "NormalTextColour", "FFFD0000") guiEditSetReadOnly(GUIEditor.edit[20], true) GUIEditor.tab[7] = guiCreateTab("Reduceri", GUIEditor.tabpanel[2]) GUIEditor.edit[21] = guiCreateEdit(6, 9, 194, 27, "Cu ocazia sarbatorilor de Craciun,", false, GUIEditor.tab[7]) guiSetProperty(GUIEditor.edit[21], "NormalTextColour", "FF2003F9") guiEditSetReadOnly(GUIEditor.edit[21], true) GUIEditor.edit[22] = guiCreateEdit(8, 41, 192, 34, "Echipa RWR-GAMING va ofera o", false, GUIEditor.tab[7]) guiSetProperty(GUIEditor.edit[22], "NormalTextColour", "FF2003F9") guiEditSetReadOnly(GUIEditor.edit[22], true) GUIEditor.edit[23] = guiCreateEdit(8, 85, 192, 34, "reducere , iar aceasta consta in", false, GUIEditor.tab[7]) guiSetProperty(GUIEditor.edit[23], "NormalTextColour", "FF2003F9") guiEditSetReadOnly(GUIEditor.edit[23], true) GUIEditor.edit[24] = guiCreateEdit(8, 129, 192, 34, "20%.(5e=3e ;2e=1e;3e=2e;etc)", false, GUIEditor.tab[7]) guiSetProperty(GUIEditor.edit[24], "NormalTextColour", "FF2003F9") guiEditSetReadOnly(GUIEditor.edit[24], true) GUIEditor.staticimage[2] = guiCreateStaticImage(5, 172, 205, 180, ":TAB/icon.png", false, GUIEditor.tab[7]) GUIEditor.window[2] = guiCreateWindow(0.19, 0.14, 0.62, 0.61, "Panou donati - Romania Wasted Roleplay ", true) guiWindowSetMovable(GUIEditor.window[2], false) guiWindowSetSizable(GUIEditor.window[2], false) guiSetProperty(GUIEditor.window[2], "CaptionColour", "FF29FB00") GUIEditor.edit[25] = guiCreateEdit(0.70, 0.88, 0.29, 0.07, "ori Alex Wizz!Doar PaySafeCard!", true, GUIEditor.window[2]) guiSetProperty(GUIEditor.edit[25], "NormalTextColour", "FFFE0000") guiEditSetReadOnly(GUIEditor.edit[25], true) GUIEditor.edit[26] = guiCreateEdit(0.70, 0.79, 0.29, 0.09, "Donatile se fac decat la Paul Dima", true, GUIEditor.window[2]) guiSetProperty(GUIEditor.edit[26], "NormalTextColour", "FFFE0000") guiEditSetReadOnly(GUIEditor.edit[26], true) GUIEditor.tabpanel[3] = guiCreateTabPanel(13, 36, 469, 477, false, GUIEditor.window[2]) GUIEditor.tab[8] = guiCreateTab("Vehicule Donator", GUIEditor.tabpanel[3]) GUIEditor.gridlist[5] = guiCreateGridList(0.01, 0.01, 0.97, 0.96, true, GUIEditor.tab[8]) guiGridListAddColumn(GUIEditor.gridlist[5], "Vehicul", 0.3) guiGridListAddColumn(GUIEditor.gridlist[5], "Pret(Euro)", 0.3) guiGridListAddColumn(GUIEditor.gridlist[5], "Viteza(km/h)", 0.3) for i = 1, 5 do guiGridListAddRow(GUIEditor.gridlist[5]) end guiGridListSetItemText(GUIEditor.gridlist[5], 0, 1, "Infernus", false, false) guiGridListSetItemText(GUIEditor.gridlist[5], 0, 2, "5", false, false) guiGridListSetItemText(GUIEditor.gridlist[5], 0, 3, "250", false, false) guiGridListSetItemText(GUIEditor.gridlist[5], 1, 1, "Bullet", false, false) guiGridListSetItemText(GUIEditor.gridlist[5], 1, 2, "5", false, false) guiGridListSetItemText(GUIEditor.gridlist[5], 1, 3, "240", false, false) guiGridListSetItemText(GUIEditor.gridlist[5], 2, 1, "Hotring Race", false, false) guiGridListSetItemText(GUIEditor.gridlist[5], 2, 2, "3", false, false) guiGridListSetItemText(GUIEditor.gridlist[5], 2, 3, "200", false, false) guiGridListSetItemText(GUIEditor.gridlist[5], 3, 1, "Hotring Race 3", false, false) guiGridListSetItemText(GUIEditor.gridlist[5], 3, 2, "3", false, false) guiGridListSetItemText(GUIEditor.gridlist[5], 3, 3, "205", false, false) guiGridListSetItemText(GUIEditor.gridlist[5], 4, 1, "Bus", false, false) guiGridListSetItemText(GUIEditor.gridlist[5], 4, 2, "2", false, false) guiGridListSetItemText(GUIEditor.gridlist[5], 4, 3, "100", false, false) GUIEditor.tab[9] = guiCreateTab("Case Donator", GUIEditor.tabpanel[3]) GUIEditor.gridlist[6] = guiCreateGridList(0.01, 0.01, 0.96, 0.97, true, GUIEditor.tab[9]) guiGridListAddColumn(GUIEditor.gridlist[6], "Locatie", 0.2) guiGridListAddColumn(GUIEditor.gridlist[6], "+gate", 0.2) guiGridListAddColumn(GUIEditor.gridlist[6], "gate ", 0.2) guiGridListAddColumn(GUIEditor.gridlist[6], "Marime", 0.2) for i = 1, 6 do guiGridListAddRow(GUIEditor.gridlist[6]) end guiGridListSetItemText(GUIEditor.gridlist[6], 0, 1, "Las Venturas", false, false) guiGridListSetItemText(GUIEditor.gridlist[6], 0, 2, "10", false, false) guiGridListSetItemText(GUIEditor.gridlist[6], 0, 3, "da", false, false) guiGridListSetItemText(GUIEditor.gridlist[6], 0, 4, "Mare", false, false) guiGridListSetItemText(GUIEditor.gridlist[6], 1, 1, "Las Venturas", false, false) guiGridListSetItemText(GUIEditor.gridlist[6], 1, 2, "5", false, false) guiGridListSetItemText(GUIEditor.gridlist[6], 1, 3, "nu", false, false) guiGridListSetItemText(GUIEditor.gridlist[6], 1, 4, "Mic", false, false) guiGridListSetItemText(GUIEditor.gridlist[6], 2, 1, "Los Santos", false, false) guiGridListSetItemText(GUIEditor.gridlist[6], 2, 2, "10", false, false) guiGridListSetItemText(GUIEditor.gridlist[6], 2, 3, "da", false, false) guiGridListSetItemText(GUIEditor.gridlist[6], 2, 4, "Mare", false, false) guiGridListSetItemText(GUIEditor.gridlist[6], 3, 1, "Los Santos", false, false) guiGridListSetItemText(GUIEditor.gridlist[6], 3, 2, "7", false, false) guiGridListSetItemText(GUIEditor.gridlist[6], 3, 3, "da", false, false) guiGridListSetItemText(GUIEditor.gridlist[6], 3, 4, "Medium", false, false) guiGridListSetItemText(GUIEditor.gridlist[6], 4, 1, "Los Santos", false, false) guiGridListSetItemText(GUIEditor.gridlist[6], 4, 2, "5", false, false) guiGridListSetItemText(GUIEditor.gridlist[6], 4, 3, "nu", false, false) guiGridListSetItemText(GUIEditor.gridlist[6], 4, 4, "Mic", false, false) guiGridListSetItemText(GUIEditor.gridlist[6], 5, 1, "La alegere", false, false) guiGridListSetItemText(GUIEditor.gridlist[6], 5, 2, "15", false, false) guiGridListSetItemText(GUIEditor.gridlist[6], 5, 3, "La alegere", false, false) guiGridListSetItemText(GUIEditor.gridlist[6], 5, 4, "La alegere", false, false) GUIEditor.tab[10] = guiCreateTab("Bonus Donator", GUIEditor.tabpanel[3]) GUIEditor.gridlist[7] = guiCreateGridList(0.01, 0.01, 0.97, 0.97, true, GUIEditor.tab[10]) guiGridListAddColumn(GUIEditor.gridlist[7], "Nume Bonus", 0.5) guiGridListAddColumn(GUIEditor.gridlist[7], "Pret(Euro)", 0.5) for i = 1, 6 do guiGridListAddRow(GUIEditor.gridlist[7]) end guiGridListSetItemText(GUIEditor.gridlist[7], 0, 1, "Nitro x5", false, false) guiGridListSetItemText(GUIEditor.gridlist[7], 0, 2, "1", false, false) guiGridListSetItemText(GUIEditor.gridlist[7], 1, 1, "Nitro x10", false, false) guiGridListSetItemText(GUIEditor.gridlist[7], 1, 2, "2", false, false) guiGridListSetItemText(GUIEditor.gridlist[7], 2, 1, "500.000 lei in joc", false, false) guiGridListSetItemText(GUIEditor.gridlist[7], 2, 2, "1", false, false) guiGridListSetItemText(GUIEditor.gridlist[7], 3, 1, "Mobila Donator", false, false) guiGridListSetItemText(GUIEditor.gridlist[7], 3, 2, "1", false, false) guiGridListSetItemText(GUIEditor.gridlist[7], 4, 1, "Chat de donator", false, false) guiGridListSetItemText(GUIEditor.gridlist[7], 4, 2, "1", false, false) guiGridListSetItemText(GUIEditor.gridlist[7], 5, 1, "Nume de donator", false, false) guiGridListSetItemText(GUIEditor.gridlist[7], 5, 2, "1", false, false) GUIEditor.tab[11] = guiCreateTab("Regulament Donator", GUIEditor.tabpanel[3]) GUIEditor.edit[27] = guiCreateEdit(9, 9, 450, 26, "Dragi jucatori/donatori , daca cumva ati donat pe server sau doriti sa o faceti", false, GUIEditor.tab[11]) guiEditSetReadOnly(GUIEditor.edit[27], true) GUIEditor.edit[28] = guiCreateEdit(9, 40, 450, 26, "trebuie sa respectati un regulament , si anume acesta , aveti mai jos niste", false, GUIEditor.tab[11]) guiEditSetReadOnly(GUIEditor.edit[28], true) GUIEditor.edit[29] = guiCreateEdit(9, 71, 65, 26, "reguli.", false, GUIEditor.tab[11]) guiEditSetReadOnly(GUIEditor.edit[29], true) GUIEditor.edit[30] = guiCreateEdit(9, 102, 450, 26, "Daca ati donat asta nu inseamna ca va permiteti sa amenintati jucatori sau", false, GUIEditor.tab[11]) guiEditSetReadOnly(GUIEditor.edit[30], true) GUIEditor.edit[31] = guiCreateEdit(9, 134, 450, 26, "sa luati peste picior staff-ul.Nu aveti voie sa va dati contul la alti jucatori .", false, GUIEditor.tab[11]) guiEditSetReadOnly(GUIEditor.edit[31], true) GUIEditor.staticimage[3] = guiCreateStaticImage(525, 22, 57, 75, ":guieditor/images/dx_elements/radio_button.png", false, GUIEditor.tab[11]) GUIEditor.edit[32] = guiCreateEdit(9, 170, 450, 26, "In caz ca va pierdeti cont-ul , trebuie sa faceti o cerere pe pagina de FB", false, GUIEditor.tab[11]) guiEditSetReadOnly(GUIEditor.edit[32], true) GUIEditor.edit[33] = guiCreateEdit(9, 206, 450, 26, "a serverului, si sa va prezentati cu niste dovezi si numele contului.(de retinut", false, GUIEditor.tab[11]) guiEditSetReadOnly(GUIEditor.edit[33], true) GUIEditor.edit[34] = guiCreateEdit(10, 242, 450, 26, "contul v-a fi sters definitiv si toate item-ele se vor muta pe contul nou)", false, GUIEditor.tab[11]) guiEditSetReadOnly(GUIEditor.edit[34], true) GUIEditor.edit[35] = guiCreateEdit(9, 278, 450, 26, "Cu toate ca ati donat pe server , la 3 abateri primiti remove la functie,", false, GUIEditor.tab[11]) guiEditSetReadOnly(GUIEditor.edit[35], true) GUIEditor.edit[36] = guiCreateEdit(9, 314, 450, 26, "asa ca aveti grija cum si ce faceti.Prin abateri ne referim la :", false, GUIEditor.tab[11]) guiEditSetReadOnly(GUIEditor.edit[36], true) GUIEditor.edit[37] = guiCreateEdit(9, 350, 450, 26, "Amenintare playeri, abuz, jicniri staff,atitudine de imatur , etc.", false, GUIEditor.tab[11]) guiEditSetReadOnly(GUIEditor.edit[37], true) GUIEditor.edit[38] = guiCreateEdit(9, 386, 450, 26, "Cu respect Fondatori serverului , Paul Dima si Alex Wizz!", false, GUIEditor.tab[11]) guiSetProperty(GUIEditor.edit[38], "NormalTextColour", "FF4700FD") guiEditSetReadOnly(GUIEditor.edit[38], true) GUIEditor.tabpanel[4] = guiCreateTabPanel(491, 38, 210, 380, false, GUIEditor.window[2]) GUIEditor.tab[12] = guiCreateTab("Grade", GUIEditor.tabpanel[4]) GUIEditor.gridlist[8] = guiCreateGridList(6, 7, 200, 344, false, GUIEditor.tab[12]) guiGridListAddColumn(GUIEditor.gridlist[8], "Grad", 0.5) guiGridListAddColumn(GUIEditor.gridlist[8], "Pret(Euro)", 0.5) for i = 1, 5 do guiGridListAddRow(GUIEditor.gridlist[8]) end guiGridListSetItemText(GUIEditor.gridlist[8], 0, 1, "Admin 1", false, false) guiGridListSetItemText(GUIEditor.gridlist[8], 0, 2, "10", false, false) guiGridListSetItemText(GUIEditor.gridlist[8], 1, 1, "Admin 2", false, false) guiGridListSetItemText(GUIEditor.gridlist[8], 1, 2, "15", false, false) guiGridListSetItemText(GUIEditor.gridlist[8], 2, 1, "Moderator in probe", false, false) guiGridListSetItemText(GUIEditor.gridlist[8], 2, 2, "20", false, false) guiGridListSetItemText(GUIEditor.gridlist[8], 3, 1, "Moderator", false, false) guiGridListSetItemText(GUIEditor.gridlist[8], 3, 2, "25", false, false) guiGridListSetItemText(GUIEditor.gridlist[8], 4, 1, "Helper", false, false) guiGridListSetItemText(GUIEditor.gridlist[8], 4, 2, "5+test", false, false) GUIEditor.tab[13] = guiCreateTab("Anunt grade", GUIEditor.tabpanel[4]) GUIEditor.edit[39] = guiCreateEdit(5, 10, 195, 30, "Acelasi regulament se aplica si", false, GUIEditor.tab[13]) guiSetProperty(GUIEditor.edit[39], "NormalTextColour", "FFFD0000") guiEditSetReadOnly(GUIEditor.edit[39], true) GUIEditor.edit[40] = guiCreateEdit(5, 50, 195, 30, "la STAFF , in caz ca abuzati,", false, GUIEditor.tab[13]) guiSetProperty(GUIEditor.edit[40], "NormalTextColour", "FFFD0000") guiEditSetReadOnly(GUIEditor.edit[40], true) GUIEditor.edit[41] = guiCreateEdit(5, 90, 195, 30, "jigniti jucatori/staff-ul intentionat", false, GUIEditor.tab[13]) guiSetProperty(GUIEditor.edit[41], "NormalTextColour", "FFFD0000") guiEditSetReadOnly(GUIEditor.edit[41], true) GUIEditor.edit[42] = guiCreateEdit(5, 130, 195, 30, "etc.. Riscati sa va pierdeti grad-ul", false, GUIEditor.tab[13]) guiSetProperty(GUIEditor.edit[42], "NormalTextColour", "FFFD0000") guiEditSetReadOnly(GUIEditor.edit[42], true) GUIEditor.edit[43] = guiCreateEdit(5, 170, 195, 30, "si in caz ca faceti prostioare grave", false, GUIEditor.tab[13]) guiSetProperty(GUIEditor.edit[43], "NormalTextColour", "FFFD0000") guiEditSetReadOnly(GUIEditor.edit[43], true) GUIEditor.edit[44] = guiCreateEdit(5, 210, 195, 30, "riscati si BAN PERMANENT!", false, GUIEditor.tab[13]) guiSetProperty(GUIEditor.edit[44], "NormalTextColour", "FFFD0000") guiEditSetReadOnly(GUIEditor.edit[44], true) GUIEditor.tab[14] = guiCreateTab("Reduceri", GUIEditor.tabpanel[4]) GUIEditor.edit[45] = guiCreateEdit(6, 9, 194, 27, "Cu ocazia sarbatorilor de Craciun,", false, GUIEditor.tab[14]) guiSetProperty(GUIEditor.edit[45], "NormalTextColour", "FF2003F9") guiEditSetReadOnly(GUIEditor.edit[45], true) GUIEditor.edit[46] = guiCreateEdit(8, 41, 192, 34, "Echipa RWR-GAMING va ofera o", false, GUIEditor.tab[14]) guiSetProperty(GUIEditor.edit[46], "NormalTextColour", "FF2003F9") guiEditSetReadOnly(GUIEditor.edit[46], true) GUIEditor.edit[47] = guiCreateEdit(8, 85, 192, 34, "reducere , iar aceasta consta in", false, GUIEditor.tab[14]) guiSetProperty(GUIEditor.edit[47], "NormalTextColour", "FF2003F9") guiEditSetReadOnly(GUIEditor.edit[47], true) GUIEditor.edit[48] = guiCreateEdit(8, 129, 192, 34, "20%.(5e=3e ;2e=1e;3e=2e;etc)", false, GUIEditor.tab[14]) guiSetProperty(GUIEditor.edit[48], "NormalTextColour", "FF2003F9") guiEditSetReadOnly(GUIEditor.edit[48], true) GUIEditor.staticimage[4] = guiCreateStaticImage(5, 172, 205, 180, ":TAB/icon.png", false, GUIEditor.tab[14]) GUIEditor.button[1] = guiCreateButton(502, 500, 203, 17, "Close window", false, GUIEditor.window[2]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") -- put the event here addEventHandler ( "onClientGUIClick", GUIEditor.button[1], closeFunction, false ) end ) -- Close the Gui function closeFunction (button) if button == "left" then guiSetVisible ( GUIEditor.window[1], false ) showCursor(false) end end BTW I recommend you to read every thing on the wiki page.
  8. function closeFunction ( button ) if button == "left" then guiSetVisible ( GUIEditor.window[1], false ) showCursor(false) end end
  9. yeah exactly guiSetVisible ( GUIEditor.window[1], false ) showCursor(false)
  10. All what you need is : -- check if the number is stored in account data + get the account name of the owner function isStoredNumber(number) if number and tonumber(number) then local accounts = getAccounts() local owner = false for i=1, #accounts do local storedNumbers = getAccountData(accounts[i],"phoneNumber") if (tonumber(storedNumbers) == number) then owner = getAccountName(accounts[i]) break end end -- get the number owner if owner then return owner end end return false end Example how to use it local number = 331144 local owner = isStoredNumber(number) -- check if it's a stored number if owner then outputChatBox(owner) -- output the account name of the owner end
  11. you can use sth like this to get a free dimension local curDimension = 1 function getFreeDimension () curDimension = curDimension + 1 return curDimension end
  12. Try this function giveCash(player, command, who, amount) local playeraccount = getPlayerAccount (player) if playeraccount and not isGuestAccount(playeraccount) then if who then local otherguy = getPlayerFromPartialName(who) if otherguy then if otherguy ~= player then local otheraccount = getPlayerAccount (otherguy) local coinslimit = tonumber(getAccountData(playeraccount, "knightcoins") or 0) if otheraccount and not isGuestAccount(otheraccount) then if amount and tonumber(amount) then if round(tonumber(amount)) > coinslimit then local givercash = coinslimit - round(tonumber(amount)) local recievercash = tonumber(getAccountData(otheraccount, "knightcoins") or 0) + round(tonumber(amount)) local plu = (round(tonumber(amount)) ~= 1 and "s") or "" setAccountData (playeraccount, "knightcoins", givercash) setElementData (player,"data.knightcoins", givercash, true) setAccountData (otheraccount, "knightcoins", recievercash) setElementData (otherguy,"data.knightcoins", recievercash, true) outputChatBox("#00FFFFYou gave #00FF00"..comma_value(round(tonumber(amount))).." #00FFFFKnightCoin"..plu.." to #FFFFFF"..getPlayerName(otherguy).."#00FFFF.", player, 0, 255, 255, true) outputChatBox("#FFFFFF"..getPlayerName(player).." #00FFFF gave you #00FF00"..comma_value(round(tonumber(amount))).." #00FFFFKnightCoin"..plu..".", otherguy, 0, 255, 255, true) else outputChatBox("You don't have so many KnightCoins. Please select a lower amount to give.", player, 255, 0, 0, true) end else outputChatBox("#FF0000Correct command is : #FEFE22/give [(part of) nick] [amount]", player, 0, 255, 0, true) end else outputChatBox("This player is not registered / logged in.", player, 255, 0, 0, true) end else outputChatBox("In case you haven't noticed, you're trying to give KnightCoins to yourself. #FEFE22WAKE UP!", player, 0, 255, 0, true) end else outputChatBox("No player found.", player, 255, 0,0) end else outputChatBox("#FF0000Correct command is : #FEFE22/give [(part of) nick] [amount]", player, 0, 255, 0, true) end else outputChatBox("You need to register and login in order to share coins!", player, 255,153,0) end end addCommandHandler("give", giveCash)
  13. Add event handler (onClientGUIClick) addEventHandler ( "onClientGUIClick", GUIEditor.button[1], closeFunction, false ) Then added the closeFunction function closeFunction ( button ) if button == "left" then -- put your code here end end
  14. Try this local serialhaza = { ["2B2BEE3C8B7C95BA25F714E7867557F2"] = true } function nahaza(message, messageType) if messageType == 0 then local hazik = string.find(getPlayerName(source), "Haze", 1, true) if hazik or serialhaza[getPlayerSerial(source)] then outputChatBox("haz ciapaty pedal",source) end end end addEventHandler("onPlayerChat",root,nahaza)
  15. Walid

    [HELP]

    dxCreateShader, dxCreateTexture, dxSetShaderValue, engineApplyShaderToWorldTexture
  16. Try this Previous weapon function getPreviousWeapon() local tempSlot = {} local curSlot = getPedWeaponSlot(localPlayer) if (curSlot == 0) and (getPedWeapon(localPlayer) == 0 or getPedWeapon(localPlayer) == 1) then curSlot = 13 end tempSlot["ID"] = 13 repeat tempSlot["ID"] = tempSlot["ID"]-1 until (tempSlot["ID"] < curSlot) and not (tempSlot["ID"] ~= 0 and getPedWeapon(localPlayer, tempSlot["ID"]) == 0) return getPedWeapon(localPlayer, tempSlot["ID"]) end Next Weapon function getNextWeapon() local tempSlot = {} local curSlot = getPedWeaponSlot(localPlayer) if (curSlot == 12) then curSlot = - 1 end tempSlot["ID"] = - 1 repeat tempSlot["ID"] = tempSlot["ID"] + 1 if tempSlot["ID"] == 13 then tempSlot["ID"] = -1 curSlot = -1 end until (tempSlot["ID"] > curSlot) and not (tempSlot["ID"] ~= 0 and getPedWeapon(localPlayer, tempSlot["ID"]) == 0) return getPedWeapon(localPlayer, tempSlot["ID"]) end getPedTotalAmmo , getPedAmmoInClip, getSlotFromWeapon
  17. replace (createColPolygon with createColSphere) and (getElementVelocity with getElementSpeed) setPedAimTarget : لتحديد الهدف getElementSpeed: لتحقق من سرعة السيارة
  18. Functions: createPed , createColPolygon, givePedWeapon , getElementVelocity (or getElementSpeed) , getElementPosition, setPedControlState, setPedAimTarget Events : onClientColShapeHit , onClientColShapeLeave
  19. Walid

    help

    /debugscript 3
  20. Try this local function splitWords(Lines, limit) while #Lines[#Lines] > limit do Lines[#Lines+1] = Lines[#Lines]:sub(limit+1) Lines[#Lines-1] = Lines[#Lines-1]:sub(1,limit) end end local function wordWarping(str, limit) local Lines, here, limit, found = {}, 1, limit or 72, str:find("(%s+)()(%S+)()") if found then Lines[1] = string.sub(str,1,found-1) else Lines[1] = str end str:gsub("(%s+)()(%S+)()", function(sp, st, word, fi) splitWords(Lines, limit) if fi-here > limit then here = st Lines[#Lines+1] = word else Lines[#Lines] = Lines[#Lines].." "..word end end) splitWords(Lines, limit) return Lines end local myText = "Yeah you're right but still gotta use math to part the string line by line, i think i can do it when i get home." -- Adolfram reply local myTable = wordWarping(myText,20) for k,v in pairs(myTable) do outputChatBox(k.." = "..v) end BtW MTA doesn't handle the word wrapping, It's all done by DirectX
  21. Walid

    help

    try my code
  22. use guiGridListSetItemText and change the column index.
×
×
  • Create New...