Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2013-05-05, 13:41


PanGrzybulek







Wiek: 28
Na forum: 4823 dni
Posty: 47
Nick w MP: Mentosik

Piwa: 3

Respekt: 50

Ostrzeżeń: 100%
Wyswietla mi sie b??d z giveWeapon @bad Argument,

SERVER:

function weaponplayerweapon )
giveWeapon playertonumber(bron), 100 )
takePlayerMoney player1000 )
end
addEvent ("weapon"true )
addEventHandler("weapon"getRootElement(), weapon)


CLIENT:

local marker createMarker124108113"cylinder"2025525530)
local player getLocalPlayer()



GUIEditor = {
    gridlist = {},
    button = {},
    edit = {}
}
        okno guiCreateGridList(521265516405false)
        guiSetAlpha(okno0.88)

        edit guiCreateEdit(3561258626""falseokno)
        kup guiCreateButton(30921617938"KUP"falseokno)
        GUIEditor.gridlist[2] = guiCreateGridList(25150147222falseokno)
        guiGridListAddColumn(GUIEditor.gridlist[2], "Bron"0.4)
        guiGridListAddColumn(GUIEditor.gridlist[2], "ID"0.4)
        for 1do
            guiGridListAddRow(GUIEditor.gridlist[2])
        end
        guiGridListSetItemText(GUIEditor.gridlist[2], 01"Bazuka"falsefalse)
        guiGridListSetItemText(GUIEditor.gridlist[2], 02"36"falsefalse)
        guiGridListSetItemText(GUIEditor.gridlist[2], 11"Sniper"falsefalse)
        guiGridListSetItemText(GUIEditor.gridlist[2], 12"34"falsefalse)
        guiGridListSetItemText(GUIEditor.gridlist[2], 21"Ak-47"falsefalse)
        guiGridListSetItemText(GUIEditor.gridlist[2], 22"30"falsefalse)
        guiGridListSetItemText(GUIEditor.gridlist[2], 31"Uzi"falsefalse)
        guiGridListSetItemText(GUIEditor.gridlist[2], 32"29"falsefalse)
        guiGridListSetItemText(GUIEditor.gridlist[2], 41"Shotgun"falsefalse)
        guiGridListSetItemText(GUIEditor.gridlist[2], 42"27"falsefalse)
        guiGridListSetItemText(GUIEditor.gridlist[2], 51"Colt-45"falsefalse)
        guiGridListSetItemText(GUIEditor.gridlist[2], 52"22"falsefalse)
        guiGridListSetItemText(GUIEditor.gridlist[2], 61"Granaty 10x"falsefalse)
        guiGridListSetItemText(GUIEditor.gridlist[2], 62"16"falsefalse)
        zamknij guiCreateButton(31734916141"Wyjdz"falseokno)   
        guiSetVisible oknofalse )

    function draw()
        dxDrawText("Bronie Servera Polskiego RPG"531284971342tocolor(255255255255), 1.00"bankgothic""left""top"falsefalsetruefalsefalse)
        dxDrawLine(655324919324tocolor(255255255255), 1true)
        dxDrawText("Aby zakupic bron, musisz wpisac jej ID ponizej :"551352939391tocolor(255255255255), 0.60"bankgothic""left""top"falsefalsetruefalsefalse)
        dxDrawText("Koszt : 1000 $"8574381097472tocolor(255255255255), 0.50"bankgothic""left""top"falsefalsetruefalsefalse)
        dxDrawText("Przykladowe bronie"541391781425tocolor(255255255255), 0.50"bankgothic""left""top"falsefalsetruefalsefalse)
        dxDrawText("Copyright by @BrudnyAnal.\nWiecej na originalgta.pl"531637673670tocolor(255255255255), 0.80"default-bold""left""top"falsefalsetruefalsefalse)
    end

    
    
function abrir hitElement )
if getElementType(hitElement) == "player" and (hitElement == localPlayerthen
guiSetVisible(oknotrue)
showCursor(true)
addEventHandler "onClientRender"getRootElement(), draw )
outputChatBox "Witamy w sklepie z broni?."2550)
end
end
addEventHandler("onClientMarkerHit"markerabrir)

function cerrarv()
    guiSetVisible oknofalse )
    showCursor false )
    guiSetInputEnabled false )
    removeEventHandler "onClientRender"getRootElement(), draw )
end
addEventHandler("onClientGUIClick"zamknijcerrarvfalse)


function weapon ()
if (source == kupthen
outputChatBox "Kupile? bro?."player00205 )
local bron guiGetText edit )
triggerServerEvent("weapon"getRootElement(), playerweapon)
end
end
addEventHandler "onClientGUIClick"kupweapon )


Gdzie zrobilem blad?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-05-05, 13:53


luki123luki123

Place Game






Wiek: 28
Na forum: 5275 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

Serwer:
function weaponplayerbron)
giveWeapon playertonumber(bron), 100 )
takePlayerMoney player1000 )
end
addEvent ("weapon"true )
addEventHandler("weapon"getRootElement(), weapon)


Klient:
local marker createMarker124108113"cylinder"2025525530)
local player getLocalPlayer()



GUIEditor = {
    gridlist = {},
    button = {},
    edit = {}
}
        okno guiCreateGridList(521265516405false)
        guiSetAlpha(okno0.88)

        edit guiCreateEdit(3561258626""falseokno)
        kup guiCreateButton(30921617938"KUP"falseokno)
        GUIEditor.gridlist[2] = guiCreateGridList(25150147222falseokno)
        guiGridListAddColumn(GUIEditor.gridlist[2], "Bron"0.4)
        guiGridListAddColumn(GUIEditor.gridlist[2], "ID"0.4)
        for 1do
            guiGridListAddRow(GUIEditor.gridlist[2])
        end
        guiGridListSetItemText(GUIEditor.gridlist[2], 01"Bazuka"falsefalse)
        guiGridListSetItemText(GUIEditor.gridlist[2], 02"36"falsefalse)
        guiGridListSetItemText(GUIEditor.gridlist[2], 11"Sniper"falsefalse)
        guiGridListSetItemText(GUIEditor.gridlist[2], 12"34"falsefalse)
        guiGridListSetItemText(GUIEditor.gridlist[2], 21"Ak-47"falsefalse)
        guiGridListSetItemText(GUIEditor.gridlist[2], 22"30"falsefalse)
        guiGridListSetItemText(GUIEditor.gridlist[2], 31"Uzi"falsefalse)
        guiGridListSetItemText(GUIEditor.gridlist[2], 32"29"falsefalse)
        guiGridListSetItemText(GUIEditor.gridlist[2], 41"Shotgun"falsefalse)
        guiGridListSetItemText(GUIEditor.gridlist[2], 42"27"falsefalse)
        guiGridListSetItemText(GUIEditor.gridlist[2], 51"Colt-45"falsefalse)
        guiGridListSetItemText(GUIEditor.gridlist[2], 52"22"falsefalse)
        guiGridListSetItemText(GUIEditor.gridlist[2], 61"Granaty 10x"falsefalse)
        guiGridListSetItemText(GUIEditor.gridlist[2], 62"16"falsefalse)
        zamknij guiCreateButton(31734916141"Wyjdz"falseokno)   
        guiSetVisible oknofalse )

    function draw()
        dxDrawText("Bronie Servera Polskiego RPG"531284971342tocolor(255255255255), 1.00"bankgothic""left""top"falsefalsetruefalsefalse)
        dxDrawLine(655324919324tocolor(255255255255), 1true)
        dxDrawText("Aby zakupic bron, musisz wpisac jej ID ponizej :"551352939391tocolor(255255255255), 0.60"bankgothic""left""top"falsefalsetruefalsefalse)
        dxDrawText("Koszt : 1000 $"8574381097472tocolor(255255255255), 0.50"bankgothic""left""top"falsefalsetruefalsefalse)
        dxDrawText("Przykladowe bronie"541391781425tocolor(255255255255), 0.50"bankgothic""left""top"falsefalsetruefalsefalse)
        dxDrawText("Copyright by @BrudnyAnal.\nWiecej na originalgta.pl"531637673670tocolor(255255255255), 0.80"default-bold""left""top"falsefalsetruefalsefalse)
    end

    
    
function abrir hitElement )
if getElementType(hitElement) == "player" and (hitElement == localPlayerthen
guiSetVisible(oknotrue)
showCursor(true)
addEventHandler "onClientRender"getRootElement(), draw )
outputChatBox "Witamy w sklepie z broni?."2550)
end
end
addEventHandler("onClientMarkerHit"markerabrir)

function cerrarv()
    guiSetVisible oknofalse )
    showCursor false )
    guiSetInputEnabled false )
    removeEventHandler "onClientRender"getRootElement(), draw )
end
addEventHandler("onClientGUIClick"zamknijcerrarvfalse)


function weapon ()
if (source == kupthen
outputChatBox "Kupile? bro?."player00205 )
local bron guiGetText edit )
triggerServerEvent("weapon"getRootElement(), playerbron)
end
end
addEventHandler "onClientGUIClick"kupweapon )


Licz? na zimne piwko :)

Postaw piwo autorowi tego posta
 

 
Tagi: @bad :: argument
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » @Bad Argument Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku