Jump to content

Skin Shop - problem


Matevsz

Recommended Posts

i have error:

ERROR: Couldn't find script clothes_c.lua for resource SkinShop.

Loading of resource 'SkinShop' failed.

S:

  
--local wejscie = createMarker(462,-1500.8000488281,31.60000038147,"arrow",1.20000004,0,0,0,0) 
--local wyjscie = createMarker(207.69999694824,-111.59999847412,1005.9000244141,"arrow",1.20000004,0,0,0,0) 
--local marker = createMarker(207.60000610352,-100.90000152588,1004.299987793,"cylinder",1,0,0,0,0) 
local sprzedawca = createPed(211,207.60000610352,-98.599998474121,1005.299987793,180.005493,0,0) 
local blip = createBlip(462,-1500.8000488281,31.60000038147, 45) 
  
  
function Wejscie(player) 
if getElementType(player)=="player" then 
    if source == wejscie then 
        setElementPosition(player,207.69999694824,-109.90000152588,1005.0999755859,0.00274658,0,0) 
        setElementInterior(player,15) 
        setElementInterior(sprzedawca,15) 
        setElementFrozen(player,true) 
        setTimer(setElementFrozen,2000,1,player,false) 
    end 
end 
end 
addEventHandler("onMarkerHit",wejscie,Wejscie) 
  
function Wyjscie(player) 
if getElementType(player)=="player" then 
    if source == wyjscie then 
        setElementPosition(player,459.20001220703,-1500.9000244141,31,96.0027465,0,0) 
        setElementInterior(player,0) 
        setElementFrozen(player, true) 
        setTimer(setElementFrozen,2000,1,player,false) 
    end 
end 
end 
addEventHandler("onMarkerHit", wyjscie,Wyjscie) 
  
function Skiny() 
    local xml = xmlLoadFile("Skiny.xml") 
    for index, category in pairs(xmlNodeGetChildren(xml) do 
        local cName = xmlNodeGetAttribute(category, "Nazwa") 
        skinsTable.categories[cName] = {} 
        for index, skin in pairs(xmlNodeGetChildren(category)) do 
            local id, Nazwa = xmlNodeGetAttribute(skin, "Model"), xmlNodeGetAttribute(skin, "Nazwa") 
            skinsTable.categories[cNames][id] = Nazwa 
            skinsTable.all[id] = Nazwa 
        end 
    end 
    xmlUnloadFile(xml) 
end 
addEventHandler("onResourceStart", resourceRoot, Skiny) 
  
function WybieranieSkina(player, matchingDimension) 
    if (player and getElementType(player) == "player" and matchingDimension) then 
        local skins = getSkinsTable() 
        triggerServerEvent(player, "clothes.showSkin", player, skins) 
        triggerServerEvent(player, "clothes.showSkin", player, skins) 
    end 
end 
  

C:

  
GUIEditor = { 
label = {}, 
button = {}, 
window = {}, 
scrollbar = {}, 
girldlist = {} 
} 
addEventHandler("onClientResourceStart",resourceRoot, 
function gui() 
    GUIEditor.window[1] = guiCreateWindow(1281, 255, 328, 496, "Skin Shop v.1.0.0 by Matevsz/teusz0724k", false) 
    guiWindowSetSizable(GUIEditor.window[1], false) 
    GUIEditor.button[1] = guiCreateButton(103, 450, 128, 36, "Zamknij", false, GUIEditor.window[1]) 
    GUIEditor.girldlist[1] = guiCreateGridList(15, 34, 303, 406, false, GUIEditor.window[1]) 
    GUIEditor.scrollbar[1] = guiCreateScrollBar(286, 4, 17, 402, false, false, GUIEditor.girldlist.[1]) 
    GUIEditor.label[1] = guiCreateLabel(10, 10, 45, 15, "Nazwa", false, GUIEditor.girldlist[1]) 
    GUIEditor.label[2] = guiCreateLabel(178, 10, 45, 15, "ID", false, GUIEditor.girldlist[1]) 
    GUIEditor.label[3] = guiCreateLabel(6, 15, 276, 15, "_______________________________________", false, GUIEditor.girldlist[1]) 
    guiSetVisible(GUIEditor.window[1], false) 
    addEventHandler("onClientGUIClick", GUIEditor.button[1], function () guiSetVisible(GUIEditor.window[1], false) showCursor(false) setPlayerHudComponentVisible("all", true) setElementModel(localPlayer, Model) setElementFrozen(localPlayer, false) end, false) 
    addEventHandler("onClientGUIClick", GUIEditor.girldlist[1], previewSkin, false) 
end  
) 
addEventHandler("onClientResourceStart", resourceRoot, gui) 
  
function showSkin(skinsTable) 
    guiGridListClear(GUIEditor.girldlist[1]) 
    setElementFrozen(localPlayer, true) 
    for category, skins in pairs(skinsTable) do 
        local row = guiGridListAddRow(GUIEditor.girldlist[1]) 
        guiGridListSetItemText(GUIEditor.girldlist[1], row, 1, category, true, false) 
        for id, name in pairs(skins) do 
            local row = guiGridListAddRow(GUIEditor.girldlist[1]) 
            guiGridListSetItemText(GUIEditor.girldlist[1], row, 1, name, false, false) 
            guiGridListSetItemText(GUIEditor.girldlist[1], row, 2, id, false, false) 
        end 
    end 
    guiSetVisible(GUIEditor.window[1], true) 
    showCursor(true) 
    model = getElementModel(localPlayer) 
end 
addEvent("clothes.showSkin", true) 
addEventHandler("clothes.showSkin", root, showSkin) 
  
function previewSkin() 
    local row = guiGridListGetSelectedItem(GUIEditor.girldlist[1]) 
    if (not row or row == -1) then return end 
    local id = guiGridListGetItemText(GUIEditor.girldlist[1], row, 2) 
    id = tonumber(id) 
    if (not id) then return end 
    setElementModel(localPlayer, id) 
end 
  
function WybierzSkina() 
    local row = guiGirdListGetSelectedItem(GUIEditor.girldlist[1]) 
    if (not row or row == -1) then return end 
    local id = guiGirdListGetItemText(GUIEditor.girldlist[1], row, 2) 
    id = tonumber(id) 
    if (not id) then return end 
    setElementModel(localPlayer, model) 
    setElementFrozen(localPlayer, false) 
    guiSetVisible(GUIEditor.window[1], false) 
    showCursor(false) 
    triggerServerEvent("clothes.WybierzSkina", root, id) 
    triggerServerEvent("clothes.WybierzSkina", root, id) 
end 
addEventHandler("onClientGUIDoubleClick", GUIEditor.girldlist[1], WybierzSkina) 
  

Link to comment

Error: line (25) Server side: Bad argument @ "addEventHandler" expected element at argument 2 not nill

Error: line (37) Server side: Bad argument @ 'addEventHandler' [Expected element at argument 2, got nil]

Error: line (41) Server side: Bad argument @ 'xmlNodeGetChildren' [Expected xml-node at argument 1, got boolean]

:(41): bad argument #1 to 'pairs' (table expected, got boolean)

Link to comment

you must add this in you server side.

skinsTable = {} 
skinsTable.all = {} 
skinsTable.categories = {} 

also this ")" missing in line 35

function Skiny() 
    local xml = xmlLoadFile("Skiny.xml") 
    for index, category in pairs(xmlNodeGetChildren(xml)) do 
        local cName = xmlNodeGetAttribute(category, "Nazwa") 
        skinsTable.categories[cName] = {} 
        for index, skin in pairs(xmlNodeGetChildren(category)) do 
            local id, Nazwa = xmlNodeGetAttribute(skin, "Model"), xmlNodeGetAttribute(skin, "Nazwa") 
            skinsTable.categories[cNames][id] = Nazwa 
            skinsTable.all[id] = Nazwa 
        end 
    end 
    xmlUnloadFile(xml) 
end 
addEventHandler("onResourceStart", resourceRoot, Skiny) 

Link to comment

WARNING: SkinShop\Skin_Shop_S.lua:28: Bad argument @ 'addEventHandler' [Expected element at argument 2, got nil]

WARNING: SkinShop\Skin_Shop_S.lua:40: Bad argument @ 'addEventHandler' [Expected element at argument 2, got nil]

WARNING: SkinShop\Skin_Shop_S.lua:44: Bad argument @ 'xmlNodeGetChildren' [Expected xml-node at argument 1, got boolean]

ERROR: SkinShop\Skin_Shop_S.lua:44: bad argument #1 to 'pairs'

Link to comment
  

        "1" name="Truth" />
        "2" name="Maccer" />
        "265" name="Tenpenny" />
        "266" name="Pulaski" />
        "267" name="Hern" />
        "268" name="Dwayne" />
        "269" name="Big Smoke" />
        "270" name="Sweet" />
        "271" name="Ryder" />
        "272" name="Forelli Guy" />
        "290" name="Rose" />
        "291" name="Kent Paul" />
        "292" name="Cesar" />
        "293" name="OG Loc" />
        "294" name="Wuzi Mu" />
        "295" name="Mike Toreno" />
        "296" name="Jizzy" />
        "297" name="Madd Dogg" />
        "298" name="Catalina" />
        "299" name="Claude from GTA 3" />
        "300" name="Ryder" />
        "301" name="Ryder Robber" />
        "302" name="Emmet" />
        "303" name="Andre" />
        "304" name="Kendl" />
        "305" name="Jethro" />
        "306" name="Zero" />
        "307" name="T-bone Mendez" />
        "308" name="Sindaco Guy" />
        "309" name="Janitor" />
        "310" name="Big Bear" />
        "311" name="Big Smoke with Vest" />
        "312" name="Physco" />
        "18" name="Black Beachguy" />
        "45" name="Beach Mustache" />
        "92" name="Rollergirl" />
        "96" name="Soccer Player" />
        "97" name="Baywatch Dude" />
        "138" name="Bikini Tattoo" />
        "139" name="Yellow Bikini" />
        "140" name="Buxom Bikini" />
        "154" name="Beach Blonde" />
        "251" name="Lifeguard" />
        "252" name="Naked Freak" />
        "7" name="Casual Jeanjacket" />
        "10" name="Old Fat Lady" />
        "14" name="Floral Shirt" />
        "15" name="Plaid Baldy" />
        "20" name="Fresh Prince" />
        "23" name="Skater Kid" />   
        "32" name="Eyepatch" />
        "39" name="Old Maid" />
        "53" name="Golf Lady" />
        "54" name="Hispanic Woman" />
        "56" name="Legwarmers 1" />
        "58" name="Chinese Plaid" />
        "60" name="Chinese Casual" />
        "62" name="Pajama Man 1" />
        "69" name="Denim Girl" />
        "72" name="Bearded Hippie" />
        "88" name="Casual Old Lady" />
        "93" name="Hoop Earrings 1" />
        "101" name="Jacket Hippie" />
        "136" name="Old Rasta" />
        "142" name="African 1" />
        "143" name="Sam Jackson" />
        "170" name="PubeStache Tshirt" />
        "182" name="Pajama Man 2" />
        "184" name="Neckbeard" />
        "188" name="Green Shirt" />
        "215" name="Explorer" />
        "218" name="Old Woman" />
        "220" name="African 2" />
        "221" name="Beardo Casual" />
        "222" name="Beardo Clubbing" />
        "224" name="Elderly Asian 1" />
        "225" name="Elderly Asian 2" />
        "226" name="Legwarmers 2" />
        "229" name="Asian Tourist" />
        "231" name="Grannie" />
        "232" name="Grouchy lady" />
        "233" name="Hoop Earrings 2" />
        "234" name="Buzzcut" />
        "236" name="Happy Old Man" />
        "250" name="Green Tshirt" />
        "262" name="Pajama Man 2 b" />
        "20" name="Fresh Prince" />
        "91" name="Sharon Stone" />
        "143" name="Sam Jackson" />
        "147" name="Sigmund Freud" />
        "240" name="Hugh Grant" />
        "251" name="Lifeguard" />
        "258" name="Joe Pesci" />
        "259" name="Chris Penn" />
        "31" name="Fat Cowgirl" />
        "33" name="Bounty Hunter" />
        "34" name="Marlboro Man" />
        "44" name="Tatooed Plaid" />
        "128" name="Native Rancher" />
        "129" name="Native Librarian" />
        "130" name="Native Ugly" />
        "131" name="Native Sexy" />
        "132" name="Native Geezer" />
        "133" name="Furys Trucker" />
        "157" name="Farmer Girl" />
        "158" name="Farmer" />
        "159" name="Farmer Redneck" />
        "160" name="Bald Redneck" />
        "161" name="Smoking Cowboy" />
        "162" name="Inbred" />
        "196" name="Aunt May" />
        "197" name="Smoking Maid" />
        "198" name="Ranch Cowgirl" />
        "199" name="Heidi" />
        "200" name="Hairy Redneck" />
        "201" name="Trucker Girl" />
        "202" name="Beer Trucker" />
        "236" name="Happy Old Man" />
        "261" name="Southerner" />
        "25" name="Varsity jacket" />
        "66" name="Varsity Bandits" />
        "56" name="Legwarmers 1" />
        "226" name="Legwarmers 2" />
       
Link to comment

there is no category in your "Skiny.xml" you must add sth like this

<skins> 
    <group name="Group name here">
        <skin model="1" name="Truth" />
        <skin model="2" name="Maccer" />
        <skin model="265" name="Tenpenny" />
        <skin model="266" name="Pulaski" />
        <skin model="267" name="Hern" />
        <skin model="268" name="Dwayne" />
        <skin model="269" name="Big Smoke" />
        <skin model="270" name="Sweet" />
        <skin model="271" name="Ryder" />
        <skin model="272" name="Forelli Guy" />
        <skin model="290" name="Rose" />
        <skin model="291" name="Kent Paul" />
        <skin model="292" name="Cesar" />
        <skin model="293" name="OG Loc" />
        <skin model="294" name="Wuzi Mu" />
        <skin model="295" name="Mike Toreno" />
        <skin model="296" name="Jizzy" />
        <skin model="297" name="Madd Dogg" />
        <skin model="298" name="Catalina" />
        <skin model="299" name="Claude from GTA 3" />
        <skin model="300" name="Ryder" />
        <skin model="301" name="Ryder Robber" />
        <skin model="302" name="Emmet" />
        <skin model="303" name="Andre" />
        <skin model="304" name="Kendl" />
        <skin model="305" name="Jethro" />
        <skin model="306" name="Zero" />
        <skin model="307" name="T-bone Mendez" />
        <skin model="308" name="Sindaco Guy" />
        <skin model="309" name="Janitor" />
        <skin model="310" name="Big Bear" />
        <skin model="311" name="Big Smoke with Vest" />
        <skin model="312" name="Physco" />
        <skin model="18" name="Black Beachguy" />
        <skin model="45" name="Beach Mustache" />
        <skin model="92" name="Rollergirl" />
        <skin model="96" name="Soccer Player" />
        <skin model="97" name="Baywatch Dude" />
        <skin model="138" name="Bikini Tattoo" />
        <skin model="139" name="Yellow Bikini" />
        <skin model="140" name="Buxom Bikini" />
        <skin model="154" name="Beach Blonde" />
        <skin model="251" name="Lifeguard" />
        <skin model="252" name="Naked Freak" />
        <skin model="7" name="Casual Jeanjacket" />
        <skin model="10" name="Old Fat Lady" />
        <skin model="14" name="Floral Shirt" />
        <skin model="15" name="Plaid Baldy" />
        <skin model="20" name="Fresh Prince" />
        <skin model="23" name="Skater Kid" />  
        <skin model="32" name="Eyepatch" />
        <skin model="39" name="Old Maid" />
        <skin model="53" name="Golf Lady" />
        <skin model="54" name="Hispanic Woman" />
        <skin model="56" name="Legwarmers 1" />
        <skin model="58" name="Chinese Plaid" />
        <skin model="60" name="Chinese Casual" />
        <skin model="62" name="Pajama Man 1" />
        <skin model="69" name="Denim Girl" />
        <skin model="72" name="Bearded Hippie" />
        <skin model="88" name="Casual Old Lady" />
        <skin model="93" name="Hoop Earrings 1" />
        <skin model="101" name="Jacket Hippie" />
        <skin model="136" name="Old Rasta" />
        <skin model="142" name="African 1" />
        <skin model="143" name="Sam Jackson" />
        <skin model="170" name="PubeStache Tshirt" />
        <skin model="182" name="Pajama Man 2" />
        <skin model="184" name="Neckbeard" />
        <skin model="188" name="Green Shirt" />
        <skin model="215" name="Explorer" />
        <skin model="218" name="Old Woman" />
        <skin model="220" name="African 2" />
        <skin model="221" name="Beardo Casual" />
        <skin model="222" name="Beardo Clubbing" />
        <skin model="224" name="Elderly Asian 1" />
        <skin model="225" name="Elderly Asian 2" />
        <skin model="226" name="Legwarmers 2" />
        <skin model="229" name="Asian Tourist" />
        <skin model="231" name="Grannie" />
        <skin model="232" name="Grouchy lady" />
        <skin model="233" name="Hoop Earrings 2" />
        <skin model="234" name="Buzzcut" />
        <skin model="236" name="Happy Old Man" />
        <skin model="250" name="Green Tshirt" />
        <skin model="262" name="Pajama Man 2 b" />
        <skin model="20" name="Fresh Prince" />
        <skin model="91" name="Sharon Stone" />
        <skin model="143" name="Sam Jackson" />
        <skin model="147" name="Sigmund Freud" />
        <skin model="240" name="Hugh Grant" />
        <skin model="251" name="Lifeguard" />
        <skin model="258" name="Joe Pesci" />
        <skin model="259" name="Chris Penn" />
        <skin model="31" name="Fat Cowgirl" />
        <skin model="33" name="Bounty Hunter" />
        <skin model="34" name="Marlboro Man" />
        <skin model="44" name="Tatooed Plaid" />
        <skin model="128" name="Native Rancher" />
        <skin model="129" name="Native Librarian" />
        <skin model="130" name="Native Ugly" />
        <skin model="131" name="Native Sexy" />
        <skin model="132" name="Native Geezer" />
        <skin model="133" name="Furys Trucker" />
        <skin model="157" name="Farmer Girl" />
        <skin model="158" name="Farmer" />
        <skin model="159" name="Farmer Redneck" />
        <skin model="160" name="Bald Redneck" />
        <skin model="161" name="Smoking Cowboy" />
        <skin model="162" name="Inbred" />
        <skin model="196" name="Aunt May" />
        <skin model="197" name="Smoking Maid" />
        <skin model="198" name="Ranch Cowgirl" />
        <skin model="199" name="Heidi" />
        <skin model="200" name="Hairy Redneck" />
        <skin model="201" name="Trucker Girl" />
        <skin model="202" name="Beer Trucker" />
        <skin model="236" name="Happy Old Man" />
        <skin model="261" name="Southerner" />
        <skin model="25" name="Varsity jacket" />
        <skin model="66" name="Varsity Bandits" />
        <skin model="56" name="Legwarmers 1" />
        <skin model="226" name="Legwarmers 2" />
        <skin model="221" name="Beardo Casual" />
        <skin model="222" name="Beardo Clubbing" />
        <skin model="247" name="Biker Vest" />
        <skin model="254" name="Biker Vest b" />
        <skin model="71" name="Security Guard" />
        <skin model="163" name="Casino Bouncer 1" />
        <skin model="164" name="Casino Bouncer 2" />
        <skin model="165" name="Agent Kay" />
        <skin model="166" name="Agent Jay" />
        <skin model="10" name="Old Fat Lady" />
        <skin model="31" name="Fat Cowgirl" />
        <skin model="38" name="Old Golf Lady" />
        <skin model="39" name="Old Maid" />
        <skin model="53" name="Golf Lady" />
        <skin model="54" name="Hispanic Woman" />
        <skin model="88" name="Casual Old Lady" />
        <skin model="89" name="Cleaning Lady" />
        <skin model="103" name="Baller Jacket" />
        <skin model="103" name="Baller Jacket" />
        <skin model="105" name="Grove Sweater" />
        <skin model="130" name="Native Ugly" />
        <skin model="151" name="Melanie" />
        <skin model="182" name="Pajama Man 2" />
        <skin model="197" name="Smoking Maid" />
        <skin model="199" name="Heidi" />
        <skin model="207" name="Grove Booty" />
        <skin model="218" name="Old Woman" />
        <skin model="231" name="Grannie" />
        <skin model="232" name="Grouchy lady" />
        <skin model="245" name="Ghetto Ho" />
        <skin model="258" name="Joe Pesci" />
        <skin model="259" name="Chris Penn" />
        <skin model="9" name="Business Lady" />
        <skin model="17" name="Black suit" />
        <skin model="57" name="Chinese Businessman" />
        <skin model="61" name="Pilot" />
        <skin model="76" name="Businesswoman 1" />
        <skin model="141" name="Cute Librarian" />
        <skin model="147" name="Sigmund Freud" />
        <skin model="148" name="Businesswoman 2" />
        <skin model="149" name="Businesswoman 2 b" />
        <skin model="150" name="Businesswoman 3" />
        <skin model="169" name="Asian Escort" />
        <skin model="186" name="Teacher" />
        <skin model="187" name="Japanese Businessman 1" />
        <skin model="219" name="Lady In Red" />
        <skin model="227" name="Japanese Businessman 2" />
        <skin model="228" name="Japanese Businessman 3" />
        <skin model="255" name="Limo Driver" />
        <skin model="263" name="Asian Hostess" />
        <skin model="49" name="Ninja Sensei" />
        <skin model="80" name="Red Boxer" />
        <skin model="81" name="Blue Boxer" />
        <skin model="180" name="Bball Player" />
        <skin model="203" name="Ninja 1" />
        <skin model="204" name="Ninja 2" />
        <skin model="114" name="Aztecas Stripes" />
        <skin model="115" name="Aztecas Jacket" />
        <skin model="116" name="Aztecas Shorts" />
        <skin model="13" name="Homegirl" />
        <skin model="102" name="Baller Shirt" />
        <skin model="103" name="Baller Jacket" />
        <skin model="104" name="Baller Sweater" />
        <skin model="100" name="Biker Blackshirt" />
        <skin model="247" name="Biker Vest" />
        <skin model="248" name="Biker Headband" />
        <skin model="254" name="Biker Vest b" />
        <skin model="121" name="Da Nang Army" />
        <skin model="122" name="Da Nang Bandana" />
        <skin model="123" name="Da Nang Shades" />
        <skin model="0" name="CJ" />
        <skin model="105" name="Grove Sweater" />
        <skin model="106" name="Grove Topbutton" />
        <skin model="107" name="Grove Jersey" />
        <skin model="207" name="Grove Booty" />
        <skin model="125" name="Mafia Enforcer" />
        <skin model="126" name="Mafia Wiseguy" />
        <skin model="127" name="Mafia Hitman" />
        <skin model="173" name="Rifa Hat" />
        <skin model="174" name="Rifa Vest" />
        <skin model="175" name="Rifa Suspenders" />
        <skin model="111" name="Russian Muscle" />
        <skin model="112" name="Russian Hitman" />
        <skin model="113" name="Russian Boss" />
        <skin model="120" name="Sindacco Suit" />
        <skin model="124" name="Sindacco Muscle" />
        <skin model="117" name="Triad 1" />
        <skin model="118" name="Triad 2" />
        <skin model="119" name="Triad 3" />
        <skin model="108" name="Vagos Topless" />
        <skin model="109" name="Vagos Pants" />
        <skin model="110" name="Vagos Shorts" />
        <skin model="19" name="Beach Gangsta" />
        <skin model="21" name="Striped Gangsta" />
        <skin model="22" name="Orange Sportsman" />
        <skin model="28" name="Black Dealer" />
        <skin model="29" name="White Dealer" />
        <skin model="30" name="Religious Essey" />
        <skin model="47" name="Top Button Essey" />
        <skin model="67" name="Red Bandana" />
        <skin model="143" name="Sam Jackson" />
        <skin model="241" name="Afro Brother" />
        <skin model="242" name="Dreadlock Brother" />
        <skin model="243" name="Ghetto Booty" />
        <skin model="190" name="Barbara Schternvart" />
        <skin model="191" name="Helena Wankstein" />
        <skin model="192" name="Michelle Cannes" />
        <skin model="193" name="Katie Zhan" />
        <skin model="194" name="Millie Perkins" />
        <skin model="195" name="Denise Robinson" />
        <skin model="77" name="Bag Lady" />
        <skin model="78" name="Homeless Scarf" />
        <skin model="79" name="Fat Homeless" />
        <skin model="95" name="Poor Old Man" />
        <skin model="134" name="Homeless Smoker" />
        <skin model="135" name="Skullcap Hobo" />
        <skin model="137" name="Boxhead" />
        <skin model="200" name="Hairy Redneck" />
        <skin model="212" name="Tin Foil Hat" />
        <skin model="213" name="Hobo Elvis" />
        <skin model="230" name="Hooded Hobo" />
        <skin model="43" name="Porn Producer" />
        <skin model="46" name="Dark Romeo" />
        <skin model="59" name="Chinese Romeo" />
        <skin model="185" name="Nervous Guy" />
Link to comment

WARNING: SkinShop\Skin_Shop_S.lua:28: Bad argument @ 'addEventHandler' [Expected element at argument 2, got nil] WARNING: SkinShop\Skin_Shop_S.lua:40: Bad argument @ 'addEventHandler' [Expected element at argument 2, got nil]

S:

  
--local Markerwejscie = createMarker(462,-1500.8000488281,31.60000038147,"arrow",1.20000004,0,0,0,0) 
--local Markerwyjscie = createMarker(207.69999694824,-111.59999847412,1005.9000244141,"arrow",1.20000004,0,0,0,0) 
--local marker = createMarker(207.60000610352,-100.90000152588,1004.299987793,"cylinder",1,0,0,0,0) 
local sprzedawca = createPed(211,207.60000610352,-98.599998474121,1005.299987793,180.005493) 
local blip = createBlip(462,-1500.8000488281,31.60000038147, 45) 
skinsTable = {} 
skinsTable.all = {} 
skinsTable.categories = {} 
  
  
function Wejscie(player) 
if getElementType(player)=="player" then 
    if source == wejscie then 
        setElementPosition(player,207.69999694824,-109.90000152588,1005.0999755859,0.00274658,0,0) 
        setElementInterior(player,15) 
        setElementInterior(sprzedawca,15) 
        setElementFrozen(player,true) 
        setTimer(setElementFrozen,2000,1,player,false) 
    end 
end 
end 
addEventHandler("onMarkerHit", Markerwejscie, Wejscie) 
  
function Wyjscie(player) 
if getElementType(player)=="player" then 
    if source == wyjscie then 
        setElementPosition(player,459.20001220703,-1500.9000244141,31,96.0027465,0,0) 
        setElementInterior(player,0) 
        setElementFrozen(player, true) 
        setTimer(setElementFrozen,2000,1,player,false) 
    end 
end 
end 
addEventHandler("onMarkerHit", Markerwyjscie, Wyjscie) 
  
function Skiny() 
    local xml = xmlLoadFile("Skiny.xml") 
    for index, category in pairs(xmlNodeGetChildren(xml)) do 
        local cName = xmlNodeGetAttribute(category, "name") 
        skinsTable.categories[cName] = {} 
        for index, skin in pairs(xmlNodeGetChildren(category)) do 
            local id, Nazwa = xmlNodeGetAttribute(skin, "Model"), xmlNodeGetAttribute(skin, "name") 
            skinsTable.categories[cNames][id] = Nazwa 
            skinsTable.all[id] = Nazwa 
        end 
    end 
    xmlUnloadFile(xml) 
end 
addEventHandler("onResourceStart", resourceRoot, Skiny) 
  
function WybieranieSkina(player, matchingDimension) 
    if (player and getElementType(player) == "player" and matchingDimension) then 
        local skins = getSkinsTable() 
        triggerServerEvent(player, "clothes.showSkin", player, skins) 
        triggerServerEvent(player, "clothes.showSkin", player, skins) 
    end 
end 
  

client side is not have error.

Link to comment

there is many things wrong in your code anyways try this

  
local Markerwejscie = createMarker(462,-1500.8000488281,31.60000038147,"arrow",1.20000004,0,0,0,0) 
local marker = createMarker(207.60000610352,-100.90000152588,1004.299987793,"cylinder",1,0,0,0,0) 
local Markerwyjscie = createMarker(207.69999694824,-111.59999847412,1005.9000244141,"arrow",1.20000004,0,0,0,0) 
local sprzedawca = createPed(211,207.60000610352,-98.599998474121,1005.299987793,180.005493) 
local blip = createBlip(462,-1500.8000488281,31.60000038147, 45) 
skinsTable = {} 
skinsTable.all = {} 
skinsTable.categories = {} 
  
  
function Wejscie(player) 
if getElementType(player)=="player" then 
    if source == wejscie then 
        setElementPosition(player,207.69999694824,-109.90000152588,1005.0999755859,0.00274658,0,0) 
        setElementInterior(player,15) 
        setElementInterior(sprzedawca,15) 
        setElementFrozen(player,true) 
        setTimer(setElementFrozen,2000,1,player,false) 
    end 
end 
end 
addEventHandler("onMarkerHit", Markerwejscie, Wejscie) 
  
function Wyjscie(player) 
if getElementType(player)=="player" then 
    if source == wyjscie then 
        setElementPosition(player,459.20001220703,-1500.9000244141,31,96.0027465,0,0) 
        setElementInterior(player,0) 
        setElementFrozen(player, true) 
        setTimer(setElementFrozen,2000,1,player,false) 
    end 
end 
end 
addEventHandler("onMarkerHit", Markerwyjscie, Wyjscie) 
  
function Skiny() 
    local xml = xmlLoadFile("Skiny.xml") 
    for index, category in pairs(xmlNodeGetChildren(xml)) do 
        local cName = xmlNodeGetAttribute(category, "name") 
        skinsTable.categories[cName] = {} 
        for index, skin in pairs(xmlNodeGetChildren(category)) do 
            local id, Nazwa = xmlNodeGetAttribute(skin, "Model"), xmlNodeGetAttribute(skin, "name") 
            skinsTable.categories[cNames][id] = Nazwa 
            skinsTable.all[id] = Nazwa 
        end 
    end 
    xmlUnloadFile(xml) 
end 
addEventHandler("onResourceStart", resourceRoot, Skiny) 
  
function WybieranieSkina(player, matchingDimension) 
    if (player and getElementType(player) == "player" and matchingDimension) then 
        local skins = getSkinsTable() 
        triggerServerEvent(player, "clothes.showSkin", player, skins) 
        triggerServerEvent(player, "clothes.showSkin", player, skins) 
    end 
end 
  

Link to comment

and yet the client side:

WARNING (29): bad argument @ addEventHandler [expected function at point 3, got none]

WARNING (72) bad argument @ addEventHandler [expexted element at point 2, not nil]

C:

  
GUIEditor = { 
label = {}, 
button = {}, 
window = {}, 
scrollbar = {}, 
girldlist = {} 
} 
addEventHandler("onClientResourceStart",resourceRoot, 
function gui() 
    GUIEditor.window[1] = guiCreateWindow(1281, 255, 328, 496, "Skin Shop v.1.0.0 by Matevsz/teusz0724k", false) 
    guiWindowSetSizable(GUIEditor.window[1], false) 
    GUIEditor.button[1] = guiCreateButton(103, 450, 128, 36, "Zamknij", false, GUIEditor.window[1]) 
    GUIEditor.girldlist[1] = guiCreateGridList(15, 34, 303, 406, false, GUIEditor.window[1]) 
    GUIEditor.scrollbar[1] = guiCreateScrollBar(286, 4, 17, 402, false, false, GUIEditor.girldlist[1]) 
    GUIEditor.label[1] = guiCreateLabel(10, 10, 45, 15, "Nazwa", false, GUIEditor.girldlist[1]) 
    GUIEditor.label[2] = guiCreateLabel(178, 10, 45, 15, "ID", false, GUIEditor.girldlist[1]) 
    GUIEditor.label[3] = guiCreateLabel(6, 15, 276, 15, "_______________________________________", false, GUIEditor.girldlist[1]) 
    guiSetVisible(GUIEditor.window[1], false) 
    addEventHandler("onClientGUIClick", GUIEditor.button[1], function () guiSetVisible(GUIEditor.window[1], false) showCursor(false) setPlayerHudComponentVisible("all", true) setElementModel(localPlayer, Model) setElementFrozen(localPlayer, false) end, false) 
    addEventHandler("onClientGUIClick", GUIEditor.girldlist[1], previewSkin, false) 
end  
) 
addEventHandler("onClientResourceStart", resourceRoot, gui) 
  
function showSkin(skinsTable) 
    guiGridListClear(GUIEditor.girldlist[1]) 
    setElementFrozen(localPlayer, true) 
    for category, skins in pairs(skinsTable) do 
        local row = guiGridListAddRow(GUIEditor.girldlist[1]) 
        guiGridListSetItemText(GUIEditor.girldlist[1], row, 1, category, true, false) 
        for id, name in pairs(skins) do 
            local row = guiGridListAddRow(GUIEditor.girldlist[1]) 
            guiGridListSetItemText(GUIEditor.girldlist[1], row, 1, name, false, false) 
            guiGridListSetItemText(GUIEditor.girldlist[1], row, 2, id, false, false) 
        end 
    end 
    guiSetVisible(GUIEditor.window[1], true) 
    showCursor(true) 
    model = getElementModel(localPlayer) 
end 
addEvent("clothes.showSkin", true) 
addEventHandler("clothes.showSkin", root, showSkin) 
  
function previewSkin() 
    local row = guiGridListGetSelectedItem(GUIEditor.girldlist[1]) 
    if (not row or row == -1) then return end 
    local id = guiGridListGetItemText(GUIEditor.girldlist[1], row, 2) 
    id = tonumber(id) 
    if (not id) then return end 
    setElementModel(localPlayer, id) 
end 
  
function WybierzSkina() 
    local row = guiGirdListGetSelectedItem(GUIEditor.girldlist[1]) 
    if (not row or row == -1) then return end 
    local id = guiGirdListGetItemText(GUIEditor.girldlist[1], row, 2) 
    id = tonumber(id) 
    if (not id) then return end 
    setElementModel(localPlayer, model) 
    setElementFrozen(localPlayer, false) 
    guiSetVisible(GUIEditor.window[1], false) 
    showCursor(false) 
    triggerServerEvent("clothes.WybierzSkina", root, id) 
    triggerServerEvent("clothes.WybierzSkina", root, id) 
end 
addEventHandler("onClientGUIDoubleClick", GUIEditor.girldlist[1], WybierzSkina) 
  

Link to comment

Try this

GUIEditor = { 
label = {}, 
button = {}, 
window = {}, 
scrollbar = {}, 
girldlist = {} 
} 
  
addEventHandler("onClientResourceStart",resourceRoot, 
function gui() 
    GUIEditor.window[1] = guiCreateWindow(1281, 255, 328, 496, "Skin Shop v.1.0.0 by Matevsz/teusz0724k", false) 
    guiWindowSetSizable(GUIEditor.window[1], false) 
    GUIEditor.button[1] = guiCreateButton(103, 450, 128, 36, "Zamknij", false, GUIEditor.window[1]) 
    GUIEditor.girldlist[1] = guiCreateGridList(15, 34, 303, 406, false, GUIEditor.window[1]) 
    GUIEditor.scrollbar[1] = guiCreateScrollBar(286, 4, 17, 402, false, false, GUIEditor.girldlist[1]) 
    GUIEditor.label[1] = guiCreateLabel(10, 10, 45, 15, "Nazwa", false, GUIEditor.girldlist[1]) 
    GUIEditor.label[2] = guiCreateLabel(178, 10, 45, 15, "ID", false, GUIEditor.girldlist[1]) 
    GUIEditor.label[3] = guiCreateLabel(6, 15, 276, 15, "_______________________________________", false, GUIEditor.girldlist[1]) 
    guiSetVisible(GUIEditor.window[1], false) 
    addEventHandler("onClientGUIClick", GUIEditor.button[1], function() guiSetVisible(GUIEditor.window[1], false) showCursor(false) setPlayerHudComponentVisible("all", true) setElementModel(localPlayer, Model) setElementFrozen(localPlayer, false) end, false) 
    addEventHandler("onClientGUIClick", GUIEditor.girldlist[1], previewSkin, false) 
    addEventHandler("onClientGUIDoubleClick", GUIEditor.girldlist[1], WybierzSkina,false) 
end  
) 
addEventHandler("onClientResourceStart", resourceRoot, gui) 
  
function showSkin(skinsTable) 
    guiGridListClear(GUIEditor.girldlist[1]) 
    setElementFrozen(localPlayer, true) 
    for category, skins in pairs(skinsTable) do 
        local row = guiGridListAddRow(GUIEditor.girldlist[1]) 
        guiGridListSetItemText(GUIEditor.girldlist[1], row, 1, category, true, false) 
        for id, name in pairs(skins) do 
            local row = guiGridListAddRow(GUIEditor.girldlist[1]) 
            guiGridListSetItemText(GUIEditor.girldlist[1], row, 1, name, false, false) 
            guiGridListSetItemText(GUIEditor.girldlist[1], row, 2, id, false, false) 
        end 
    end 
    guiSetVisible(GUIEditor.window[1], true) 
    showCursor(true) 
    model = getElementModel(localPlayer) 
end 
addEvent("clothes.showSkin", true) 
addEventHandler("clothes.showSkin", root, showSkin) 
  
function previewSkin() 
    local row = guiGridListGetSelectedItem(GUIEditor.girldlist[1]) 
    if (not row or row == -1) then return end 
    local id = guiGridListGetItemText(GUIEditor.girldlist[1], row, 2) 
    id = tonumber(id) 
    if (not id) then return end 
    setElementModel(localPlayer, id) 
end 
  
function WybierzSkina() 
    local row = guiGirdListGetSelectedItem(GUIEditor.girldlist[1]) 
    if (not row or row == -1) then return end 
    local id = guiGirdListGetItemText(GUIEditor.girldlist[1], row, 2) 
    id = tonumber(id) 
    if (not id) then return end 
    setElementModel(localPlayer, model) 
    setElementFrozen(localPlayer, false) 
    guiSetVisible(GUIEditor.window[1], false) 
    showCursor(false) 
    triggerServerEvent("clothes.WybierzSkina", root, id) 
    triggerServerEvent("clothes.WybierzSkina", root, id) 
end 

Link to comment
Error line (10):

'(' expected near gui

Many things wrong in your code anyways this should work

GUIEditor = { 
label = {}, 
button = {}, 
window = {}, 
scrollbar = {}, 
girldlist = {} 
} 
  
addEventHandler("onClientResourceStart",resourceRoot, 
function() 
    GUIEditor.window[1] = guiCreateWindow(1281, 255, 328, 496, "Skin Shop v.1.0.0 by Matevsz/teusz0724k", false) 
    guiWindowSetSizable(GUIEditor.window[1], false) 
    GUIEditor.button[1] = guiCreateButton(103, 450, 128, 36, "Zamknij", false, GUIEditor.window[1]) 
    GUIEditor.girldlist[1] = guiCreateGridList(15, 34, 303, 406, false, GUIEditor.window[1]) 
    GUIEditor.scrollbar[1] = guiCreateScrollBar(286, 4, 17, 402, false, false, GUIEditor.girldlist[1]) 
    GUIEditor.label[1] = guiCreateLabel(10, 10, 45, 15, "Nazwa", false, GUIEditor.girldlist[1]) 
    GUIEditor.label[2] = guiCreateLabel(178, 10, 45, 15, "ID", false, GUIEditor.girldlist[1]) 
    GUIEditor.label[3] = guiCreateLabel(6, 15, 276, 15, "_______________________________________", false, GUIEditor.girldlist[1]) 
    guiSetVisible(GUIEditor.window[1], false) 
    addEventHandler("onClientGUIClick", GUIEditor.button[1], function() guiSetVisible(GUIEditor.window[1], false) showCursor(false) setPlayerHudComponentVisible("all", true) setElementModel(localPlayer, Model) setElementFrozen(localPlayer, false) end, false) 
    addEventHandler("onClientGUIClick", GUIEditor.girldlist[1], previewSkin, false) 
    addEventHandler("onClientGUIDoubleClick", GUIEditor.girldlist[1], WybierzSkina,false) 
end 
) 
  
  
function showSkin(skinsTable) 
    guiGridListClear(GUIEditor.girldlist[1]) 
    setElementFrozen(localPlayer, true) 
    for category, skins in pairs(skinsTable) do 
        local row = guiGridListAddRow(GUIEditor.girldlist[1]) 
        guiGridListSetItemText(GUIEditor.girldlist[1], row, 1, category, true, false) 
        for id, name in pairs(skins) do 
            local row = guiGridListAddRow(GUIEditor.girldlist[1]) 
            guiGridListSetItemText(GUIEditor.girldlist[1], row, 1, name, false, false) 
            guiGridListSetItemText(GUIEditor.girldlist[1], row, 2, id, false, false) 
        end 
    end 
    guiSetVisible(GUIEditor.window[1], true) 
    showCursor(true) 
    model = getElementModel(localPlayer) 
end 
addEvent("clothes.showSkin", true) 
addEventHandler("clothes.showSkin", root, showSkin) 
  
function previewSkin() 
    local row = guiGridListGetSelectedItem(GUIEditor.girldlist[1]) 
    if (not row or row == -1) then return end 
    local id = guiGridListGetItemText(GUIEditor.girldlist[1], row, 2) 
    id = tonumber(id) 
    if (not id) then return end 
    setElementModel(localPlayer, id) 
end 
  
function WybierzSkina() 
    local row = guiGirdListGetSelectedItem(GUIEditor.girldlist[1]) 
    if (not row or row == -1) then return end 
    local id = guiGirdListGetItemText(GUIEditor.girldlist[1], row, 2) 
    id = tonumber(id) 
    if (not id) then return end 
    setElementModel(localPlayer, model) 
    setElementFrozen(localPlayer, false) 
    guiSetVisible(GUIEditor.window[1], false) 
    showCursor(false) 
    triggerServerEvent("clothes.WybierzSkina", root, id) 
    triggerServerEvent("clothes.WybierzSkina", root, id) 
end 

Link to comment

After entering the marker shows up only the cursor and gui not.

Console - 0 error and debugscript - 0 error.

S:

  
local Markerwejscie = createMarker(462,-1500.8000488281,31.60000038147,"arrow",1.20000004,0,0,0,0) 
local Markerwyjscie = createMarker(207.69999694824,-111.59999847412,1005.9000244141,"arrow",1.20000004,0,0,0,0) 
local marker = createMarker(207.60000610352,-100.90000152588,1004.299987793,"cylinder",1) 
local sprzedawca = createPed(211,207.60000610352,-98.599998474121,1005.299987793,180.005493) 
local blip = createBlip(462,-1500.8000488281,31.60000038147, 45) 
skinsTable = {} 
skinsTable.all = {} 
skinsTable.categories = {} 
  
  
function Wejscie(player) 
if getElementType(player)=="player" then 
    if source == Markerwejscie then 
        setElementPosition(player,207.69999694824,-109.90000152588,1005.0999755859) 
        setElementInterior(player,15) 
        setElementInterior(sprzedawca,15) 
        setElementInterior(Markerwyjscie,15) 
        setElementInterior(marker,15) 
        setElementFrozen(player,true) 
        setTimer(setElementFrozen,2000,1,player,false) 
    end 
end 
end 
addEventHandler("onMarkerHit", Markerwejscie, Wejscie) 
  
function Wyjscie(player) 
if getElementType(player)=="player" then 
    if source == Markerwyjscie then 
        setElementPosition(player,459.20001220703,-1500.9000244141,31) 
        setElementInterior(player,0) 
        setElementFrozen(player, true) 
        setTimer(setElementFrozen,2000,1,player,false) 
    end 
end 
end 
addEventHandler("onMarkerHit", Markerwyjscie, Wyjscie) 
  
function Skiny() 
    local xml = xmlLoadFile("Skiny.xml") 
    for index, category in pairs(xmlNodeGetChildren(xml)) do 
        local cName = xmlNodeGetAttribute(category, "name") 
        skinsTable.categories[cName] = {} 
        for index, skin in pairs(xmlNodeGetChildren(category)) do 
            local id, Nazwa = xmlNodeGetAttribute(skin, "Model"), xmlNodeGetAttribute(skin, "name") 
            skinsTable.categories[cNames][id] = Nazwa 
            skinsTable.all[id] = Nazwa 
        end 
    end 
    xmlUnloadFile(xml) 
end 
addEventHandler("onResourceStart", resourceRoot, Skiny) 
  
function WybieranieSkina(player, matchingDimension) 
    if (player and getElementType(player) == "player" and matchingDimension) then 
        local skins = getSkinsTable() 
        triggerServerEvent(player, "clothes.showSkin", player, skins) 
        triggerServerEvent(player, "clothes.showSkin", player, skins) 
    end 
end 
  
addEventHandler("onMarkerHit",marker, 
function(hitElement,matchingDimension) 
    if matchingDimension and isElement(hitElement) and getElementType(hitElement) == "player" then 
        triggerClientEvent(hitElement,"PokazGui",hitElement) 
    end 
end 
) 
  

C:

  
GUIEditor = { 
label = {}, 
button = {}, 
window = {}, 
scrollbar = {}, 
girldlist = {} 
} 
addEventHandler("onClientResourceStart",resourceRoot, 
function() 
    GUIEditor.window[1] = guiCreateWindow(1281, 255, 328, 496, "Skin Shop v.1.0.0 by Matevsz/teusz0724k", false) 
    guiWindowSetSizable(GUIEditor.window[1], false) 
    GUIEditor.button[1] = guiCreateButton(103, 450, 128, 36, "Zamknij", false, GUIEditor.window[1]) 
    GUIEditor.girldlist[1] = guiCreateGridList(15, 34, 303, 406, false, GUIEditor.window[1]) 
    GUIEditor.scrollbar[1] = guiCreateScrollBar(286, 4, 17, 402, false, false, GUIEditor.girldlist[1]) 
    GUIEditor.label[1] = guiCreateLabel(10, 10, 45, 15, "Nazwa", false, GUIEditor.girldlist[1]) 
    GUIEditor.label[2] = guiCreateLabel(178, 10, 45, 15, "ID", false, GUIEditor.girldlist[1]) 
    GUIEditor.label[3] = guiCreateLabel(6, 15, 276, 15, "_______________________________________", false, GUIEditor.girldlist[1]) 
    guiSetVisible(GUIEditor.window[1], false) 
    addEventHandler("onClientGUIClick", GUIEditor.button[1], function () guiSetVisible(GUIEditor.window[1], false) showCursor(false) setPlayerHudComponentVisible("all", true) setElementModel(localPlayer, Model) setElementFrozen(localPlayer, false) end, false) 
    addEventHandler("onClientGUIDoubleClick", GUIEditor.girldlist[1], WybierzSkina, false) 
end  
) 
  
  
function showSkin(skinsTable) 
    guiGridListClear(GUIEditor.girldlist[1]) 
    setElementFrozen(localPlayer, true) 
    for category, skins in pairs(skinsTable) do 
        local row = guiGridListAddRow(GUIEditor.girldlist[1]) 
        guiGridListSetItemText(GUIEditor.girldlist[1], row, 1, category, true, false) 
        for id, name in pairs(skins) do 
            local row = guiGridListAddRow(GUIEditor.girldlist[1]) 
            guiGridListSetItemText(GUIEditor.girldlist[1], row, 1, name, false, false) 
            guiGridListSetItemText(GUIEditor.girldlist[1], row, 2, id, false, false) 
        end 
    end 
    guiSetVisible(GUIEditor.window[1], true) 
    showCursor(true) 
    model = getElementModel(localPlayer) 
end 
addEvent("clothes.showSkin", true) 
addEventHandler("clothes.showSkin", root, showSkin) 
  
function previewSkin() 
    local row = guiGridListGetSelectedItem(GUIEditor.girldlist[1]) 
    if (not row or row == -1) then return end 
    local id = guiGridListGetItemText(GUIEditor.girldlist[1], row, 2) 
    id = tonumber(id) 
    if (not id) then return end 
    setElementModel(localPlayer, id) 
end 
  
function WybierzSkina() 
    local row = guiGirdListGetSelectedItem(GUIEditor.girldlist[1]) 
    if (not row or row == -1) then return end 
    local id = guiGirdListGetItemText(GUIEditor.girldlist[1], row, 2) 
    id = tonumber(id) 
    if (not id) then return end 
    setElementModel(localPlayer, model) 
    setElementFrozen(localPlayer, false) 
    guiSetVisible(GUIEditor.window[1], false) 
    showCursor(false) 
    triggerServerEvent("clothes.WybierzSkina", root, id) 
    triggerServerEvent("clothes.WybierzSkina", root, id) 
end 
  
function PokazGui(player) 
    guiGetVisible(GUIEditor.window[1], true) 
    showCursor(true) 
end 
addEvent("PokazGui", true) 
addEventHandler("PokazGui", root, PokazGui) 
  

Link to comment

-- Client

GUIEditor = { 
label = {}, 
button = {}, 
window = {}, 
scrollbar = {}, 
girldlist = {} 
} 
addEventHandler("onClientResourceStart",resourceRoot, 
function() 
    GUIEditor.window[1] = guiCreateWindow(0,0, 328, 496, "Skin Shop v.1.0.0 by Matevsz/teusz0724k", false) 
    guiWindowSetSizable(GUIEditor.window[1], false) 
    centerElement(GUIEditor.window[1]) 
    GUIEditor.button[1] = guiCreateButton(103, 450, 128, 36, "Zamknij", false, GUIEditor.window[1]) 
    GUIEditor.girldlist[1] = guiCreateGridList(15, 34, 303, 406, false, GUIEditor.window[1]) 
    GUIEditor.scrollbar[1] = guiCreateScrollBar(286, 4, 17, 402, false, false, GUIEditor.girldlist[1]) 
    GUIEditor.label[1] = guiCreateLabel(10, 10, 45, 15, "Nazwa", false, GUIEditor.girldlist[1]) 
    GUIEditor.label[2] = guiCreateLabel(178, 10, 45, 15, "ID", false, GUIEditor.girldlist[1]) 
    GUIEditor.label[3] = guiCreateLabel(6, 15, 276, 15, "_______________________________________", false, GUIEditor.girldlist[1]) 
    guiSetVisible(GUIEditor.window[1], false) 
    addEventHandler("onClientGUIClick", GUIEditor.button[1], function () guiSetVisible(GUIEditor.window[1], false) showCursor(false) setPlayerHudComponentVisible("all", true) setElementModel(localPlayer, Model) setElementFrozen(localPlayer, false) end, false) 
    addEventHandler("onClientGUIDoubleClick", GUIEditor.girldlist[1], WybierzSkina, false) 
end  
) 
  
  
function showSkin(skinsTable) 
    guiGridListClear(GUIEditor.girldlist[1]) 
    setElementFrozen(localPlayer, true) 
    for category, skins in pairs(skinsTable) do 
        local row = guiGridListAddRow(GUIEditor.girldlist[1]) 
        guiGridListSetItemText(GUIEditor.girldlist[1], row, 1, category, true, false) 
        for id, name in pairs(skins) do 
            local row = guiGridListAddRow(GUIEditor.girldlist[1]) 
            guiGridListSetItemText(GUIEditor.girldlist[1], row, 1, name, false, false) 
            guiGridListSetItemText(GUIEditor.girldlist[1], row, 2, id, false, false) 
        end 
    end 
    guiSetVisible(GUIEditor.window[1], true) 
    showCursor(true) 
    model = getElementModel(localPlayer) 
end 
addEvent("clothes.showSkin", true) 
addEventHandler("clothes.showSkin", root, showSkin) 
  
function previewSkin() 
    local row = guiGridListGetSelectedItem(GUIEditor.girldlist[1]) 
    if (not row or row == -1) then return end 
    local id = guiGridListGetItemText(GUIEditor.girldlist[1], row, 2) 
    id = tonumber(id) 
    if (not id) then return end 
    setElementModel(localPlayer, id) 
end 
  
function WybierzSkina() 
    local row = guiGirdListGetSelectedItem(GUIEditor.girldlist[1]) 
    if (not row or row == -1) then return end 
    local id = guiGirdListGetItemText(GUIEditor.girldlist[1], row, 2) 
    id = tonumber(id) 
    if (not id) then return end 
    setElementModel(localPlayer, model) 
    setElementFrozen(localPlayer, false) 
    guiSetVisible(GUIEditor.window[1], false) 
    showCursor(false) 
    triggerServerEvent("clothes.WybierzSkina", root, id) 
    triggerServerEvent("clothes.WybierzSkina", root, id) 
end 
  
function PokazGui(player) 
    guiGetVisible(GUIEditor.window[1], true) 
    showCursor(true) 
end 
addEvent("PokazGui", true) 
addEventHandler("PokazGui", root, PokazGui) 
  
function centerElement(center_window) 
    local screenW,screenH= guiGetScreenSize() 
    local windowW,windowH= guiGetSize(center_window,false) 
    local x,y = (screenW-windowW)/2,(screenH-windowH)/2 
    guiSetPosition(center_window,x,y,false) 
end 

-- Server

local Markerwejscie = createMarker(462,-1500.8000488281,31.60000038147,"arrow",1.20000004,0,0,0,0) 
local Markerwyjscie = createMarker(207.69999694824,-111.59999847412,1005.9000244141,"arrow",1.20000004,0,0,0,0) 
local marker = createMarker(207.60000610352,-100.90000152588,1004.299987793,"cylinder",1) 
local sprzedawca = createPed(211,207.60000610352,-98.599998474121,1005.299987793,180.005493) 
local blip = createBlip(462,-1500.8000488281,31.60000038147, 45) 
skinsTable = {} 
skinsTable.all = {} 
skinsTable.categories = {} 
  
  
function Wejscie(player) 
if getElementType(player)=="player" then 
    if source == Markerwejscie then 
        setElementPosition(player,207.69999694824,-109.90000152588,1005.0999755859) 
        setElementInterior(player,15) 
        setElementInterior(sprzedawca,15) 
        setElementInterior(Markerwyjscie,15) 
        setElementInterior(marker,15) 
        setElementFrozen(player,true) 
        setTimer(setElementFrozen,2000,1,player,false) 
    end 
end 
end 
addEventHandler("onMarkerHit", Markerwejscie, Wejscie) 
  
function Wyjscie(player) 
if getElementType(player)=="player" then 
    if source == Markerwyjscie then 
        setElementPosition(player,459.20001220703,-1500.9000244141,31) 
        setElementInterior(player,0) 
        setElementFrozen(player, true) 
        setTimer(setElementFrozen,2000,1,player,false) 
    end 
end 
end 
addEventHandler("onMarkerHit", Markerwyjscie, Wyjscie) 
  
function Skiny() 
    local xml = xmlLoadFile("Skiny.xml") 
    for index, category in pairs(xmlNodeGetChildren(xml)) do 
        local cName = xmlNodeGetAttribute(category, "name") 
        skinsTable.categories[cName] = {} 
        for index, skin in pairs(xmlNodeGetChildren(category)) do 
            local id, Nazwa = xmlNodeGetAttribute(skin, "Model"), xmlNodeGetAttribute(skin, "name") 
            skinsTable.categories[cNames][id] = Nazwa 
            skinsTable.all[id] = Nazwa 
        end 
    end 
    xmlUnloadFile(xml) 
end 
addEventHandler("onResourceStart", resourceRoot, Skiny) 
  
function WybieranieSkina(player, matchingDimension) 
    if (player and getElementType(player) == "player" and matchingDimension) then 
        local skins = getSkinsTable() 
        triggerServerEvent(player, "clothes.showSkin", player, skins) 
    end 
end 
  
addEventHandler("onMarkerHit",marker, 
function(hitElement,matchingDimension) 
    if matchingDimension and isElement(hitElement) and getElementType(hitElement) == "player" then 
        triggerClientEvent(hitElement,"PokazGui",hitElement) 
    end 
end 
) 

Link to comment
hmm no gui and no errors :|

-- Client side

GUIEditor = { 
label = {}, 
button = {}, 
window = {}, 
scrollbar = {}, 
girldlist = {} 
} 
addEventHandler("onClientResourceStart",resourceRoot, 
function() 
    GUIEditor.window[1] = guiCreateWindow(0,0, 328, 496, "Skin Shop v.1.0.0 by Matevsz/teusz0724k", false) 
    guiWindowSetSizable(GUIEditor.window[1], false) 
    centerElement(GUIEditor.window[1]) 
    GUIEditor.button[1] = guiCreateButton(103, 450, 128, 36, "Zamknij", false, GUIEditor.window[1]) 
    GUIEditor.girldlist[1] = guiCreateGridList(15, 34, 303, 406, false, GUIEditor.window[1]) 
    GUIEditor.scrollbar[1] = guiCreateScrollBar(286, 4, 17, 402, false, false, GUIEditor.girldlist[1]) 
    GUIEditor.label[1] = guiCreateLabel(10, 10, 45, 15, "Nazwa", false, GUIEditor.girldlist[1]) 
    GUIEditor.label[2] = guiCreateLabel(178, 10, 45, 15, "ID", false, GUIEditor.girldlist[1]) 
    GUIEditor.label[3] = guiCreateLabel(6, 15, 276, 15, "_______________________________________", false, GUIEditor.girldlist[1]) 
    guiSetVisible(GUIEditor.window[1], false) 
    addEventHandler("onClientGUIClick", GUIEditor.button[1], function () guiSetVisible(GUIEditor.window[1], false) showCursor(false) setPlayerHudComponentVisible("all", true) setElementModel(localPlayer, Model) setElementFrozen(localPlayer, false) end, false) 
    addEventHandler("onClientGUIDoubleClick", GUIEditor.girldlist[1], WybierzSkina, false) 
end  
) 
  
  
function showSkin(skinsTable) 
    guiGridListClear(GUIEditor.girldlist[1]) 
    setElementFrozen(localPlayer, true) 
    for category, skins in pairs(skinsTable) do 
        local row = guiGridListAddRow(GUIEditor.girldlist[1]) 
        guiGridListSetItemText(GUIEditor.girldlist[1], row, 1, category, true, false) 
        for id, name in pairs(skins) do 
            local row = guiGridListAddRow(GUIEditor.girldlist[1]) 
            guiGridListSetItemText(GUIEditor.girldlist[1], row, 1, name, false, false) 
            guiGridListSetItemText(GUIEditor.girldlist[1], row, 2, id, false, false) 
        end 
    end 
    guiSetVisible(GUIEditor.window[1], true) 
    showCursor(true) 
    model = getElementModel(localPlayer) 
end 
addEvent("clothes.showSkin", true) 
addEventHandler("clothes.showSkin", root, showSkin) 
  
function previewSkin() 
    local row = guiGridListGetSelectedItem(GUIEditor.girldlist[1]) 
    if (not row or row == -1) then return end 
    local id = guiGridListGetItemText(GUIEditor.girldlist[1], row, 2) 
    id = tonumber(id) 
    if (not id) then return end 
    setElementModel(localPlayer, id) 
end 
  
function WybierzSkina() 
    local row = guiGirdListGetSelectedItem(GUIEditor.girldlist[1]) 
    if (not row or row == -1) then return end 
    local id = guiGirdListGetItemText(GUIEditor.girldlist[1], row, 2) 
    id = tonumber(id) 
    if (not id) then return end 
    setElementModel(localPlayer, model) 
    setElementFrozen(localPlayer, false) 
    guiSetVisible(GUIEditor.window[1], false) 
    showCursor(false) 
    triggerServerEvent("clothes.WybierzSkina", root, id) 
end 
  
  
function centerElement(center_window) 
    local screenW,screenH= guiGetScreenSize() 
    local windowW,windowH= guiGetSize(center_window,false) 
    local x,y = (screenW-windowW)/2,(screenH-windowH)/2 
    guiSetPosition(center_window,x,y,false) 
end 

-- server

local Markerwejscie = createMarker(462,-1500.8000488281,31.60000038147,"arrow",1.20000004,0,0,0,0) 
local Markerwyjscie = createMarker(207.69999694824,-111.59999847412,1005.9000244141,"arrow",1.20000004,0,0,0,0) 
local marker = createMarker(207.60000610352,-100.90000152588,1004.299987793,"cylinder",1,255,255,255) 
local sprzedawca = createPed(211,207.60000610352,-98.599998474121,1005.299987793,180.005493) 
local blip = createBlip(462,-1500.8000488281,31.60000038147, 45) 
skinsTable = {} 
skinsTable.all = {} 
skinsTable.categories = {} 
  
  
function Wejscie(player) 
if getElementType(player)=="player" then 
    if source == Markerwejscie then 
        setElementPosition(player,207.69999694824,-109.90000152588,1005.0999755859) 
        setElementInterior(player,15) 
        setElementInterior(sprzedawca,15) 
        setElementInterior(Markerwyjscie,15) 
        setElementInterior(marker,15) 
        setElementFrozen(player,true) 
        setTimer(setElementFrozen,2000,1,player,false) 
    end 
end 
end 
addEventHandler("onMarkerHit", Markerwejscie, Wejscie) 
  
function Wyjscie(player) 
if getElementType(player)=="player" then 
    if source == Markerwyjscie then 
        setElementPosition(player,459.20001220703,-1500.9000244141,31) 
        setElementInterior(player,0) 
        setElementFrozen(player, true) 
        setTimer(setElementFrozen,2000,1,player,false) 
    end 
end 
end 
addEventHandler("onMarkerHit", Markerwyjscie, Wyjscie) 
  
function Skiny() 
    local xml = xmlLoadFile("Skiny.xml") 
    for index, category in pairs(xmlNodeGetChildren(xml)) do 
        local cName = xmlNodeGetAttribute(category, "name") 
        skinsTable.categories[cName] = {} 
        for index, skin in pairs(xmlNodeGetChildren(category)) do 
            local id, Nazwa = xmlNodeGetAttribute(skin, "Model"), xmlNodeGetAttribute(skin, "name") 
            skinsTable.categories[cNames][id] = Nazwa 
            skinsTable.all[id] = Nazwa 
        end 
    end 
    xmlUnloadFile(xml) 
end 
addEventHandler("onResourceStart", resourceRoot, Skiny) 
  
addEventHandler("onMarkerHit",marker, 
function(player, matchingDimension) 
    if (matchingDimension and isElement(player) and getElementType(player) == "player") then 
        local skins = getSkinsTable() 
        triggerServerEvent(player, "clothes.showSkin", player, skins) 
    end 
end 
) 
  

You must hi this marker

local marker = createMarker(207.60000610352,-100.90000152588,1004.299987793,"cylinder",1,255,255,255) 

i recommend you to read this Wiki.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...