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

Wysłany: 2016-08-04, 12:45


STOPseba

Emeryt na scenie MTA






Wiek: 25
Na forum: 3771 dni
Posty: 448
Nick w MP: STOPseba

Piwa: 5014

Respekt: 576,3
Respekt: 576,3

Witam mo?e kto? mi pom?c z tymi skryptami.Chodzi o to ?eby gracz premium m?g? korzysta? z przebieralni.
Przebieralnia:
local sx,sy guiGetScreenSize()

-- Wyb?r skina
local m3 createMarker(204.63,-159.53,1000.52-1"cylinder"223,214,255,140)
setElementInterior(m314)
setElementDimension(m35)
local ped createPed(80204.37,-157.54,1000.52180)
setElementInterior(ped14)
setElementDimension(ped5)

-- Ustawienia
local skiny_premium = {18,80,87,15,7,307,29}
local skiny_meskie = {0,1,6,19,20,21,22,23,24,25,28,32,33,34,36,43,44,45,46,47,49,52,58,59,61,66,72,78,79,81,82,83,84,95,96,99,100,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,120,122,123,124,133,134,136,137,142,143,144,146,147,155,158,160,163,164,167,170,173,174,175,176,177,179,184,185,186,187,188,189,202,203,204,210,217,220,223,228,229,236,240,241,242,247,248,249,250,252,253,255,260,262,264,269,270,271,272,290,291,292,293,294,295,296,297,299,300,303,306,308,311}
local skiny_kobiece = {12,13,31,38,39,40,41,53,55,88,91,93,135,138,139,140,145,148,150,169,192,193,197,198,201,205,211,216,219,233}

-- GUI
local sp = {}
sp.pr_okno guiCreateWindow(990/1280*sx200/720*sy270/1280*sx447/720*sy"Wybierz skin"false)
guiWindowSetMovable(sp.pr_oknofalse)
guiWindowSetSizable(sp.pr_oknotrue)
guiSetVisible(sp.pr_oknofalse)
guiSetAlpha(sp.pr_okno0.9)

sp.pr_grid guiCreateGridList(12/1280*sx36/720*sy248/1280*sx389/720*syfalsesp.pr_okno)
guiGridListSetSortingEnabled(sp.pr_gridfalse)
guiGridListAddColumn(sp.pr_grid"SKIN"0.9)

-- Ustawienia2
function przebieralniaStart()
    guiGridListClear(sp.pr_grid)

    local row guiGridListAddRow(sp.pr_grid)
    guiGridListSetItemText(sp.pr_gridrow1"Skiny m?skie"truefalse)
    for i,v in ipairs(skiny_meskie) do
        local row guiGridListAddRow(sp.pr_grid)
        guiGridListSetItemText(sp.pr_gridrow1vfalsefalse)
    end

    local row guiGridListAddRow(sp.pr_grid)
    guiGridListSetItemText(sp.pr_gridrow1"Skiny kobiece"truefalse)
    for i,v in ipairs(skiny_kobiece) do
        local row guiGridListAddRow(sp.pr_grid)
        guiGridListSetItemText(sp.pr_gridrow1vfalsefalse)
    end
    
    local row guiGridListAddRow(sp.pr_grid)
    guiGridListSetItemText(sp.pr_gridrow1"Skiny premium"truefalse)
    for i,v in ipairs(skiny_premium) do
        local row guiGridListAddRow(sp.pr_grid)
        guiGridListSetItemText(sp.pr_gridrow1vfalsefalse)
        guiGridListSetItemData(sp.pr_gridrow1"gracz_premium")
        guiGridListSetItemColor(sp.pr_gridrow12552550)
    end
end

-- Sprawdzanie
addEventHandler("onClientGUIClick"sp.pr_grid, function()
    local selectedRowselectedCol guiGridListGetSelectedItem(sp.pr_grid)
    if not selectedRow or selectedCol ~= 1 then return end
    local premium guiGridListGetItemData(sp.pr_gridselectedRowselectedCol)
    if premium and getElementData(localPlayer"gracz_premium") ~= 1 then
        outputChatBox("* Ten skin jest dla graczy PREMIUM.(Opcja W Przygotowaniu)")
        return
    end
    local model guiGridListGetItemText(sp.pr_gridselectedRowselectedCol)
    if not model then return end
    triggerServerEvent("changeSkin"localPlayertonumber(model))
end)

-- Ustawienia 2
addEventHandler("onClientMarkerHit"m3, function(el,md)
    if el ~= localPlayer then return end
    if guiGetVisible(sp.pr_okno) == false then
        --[[if getPlayerName(el) ~= "Split" then
            outputChatBox("* Przebieralnia w trakcie poprawek"el)
            return
        end]]
        przebieralniaStart()
        showCursor(truefalse)
        guiSetVisible(sp.pr_oknotrue)
    end
end)

-- Ustawienia 3
addEventHandler("onClientMarkerLeave"m3, function(elmd)
    if el ~= localPlayer then return end
    if guiGetVisible(sp.pr_okno) == true then
        showCursor(false)
        guiSetVisible(sp.pr_oknofalse)
    end
end)

Premium:
kasa:
function kasa() 
for _,v in ipairs getElementsByType("player") ) do 
local accName getAccountName getPlayerAccount ) )
if isObjectInACLGroup ("user."..accNameaclGetGroup "Premium" ) ) then  
givePlayerMoney (v200outputChatBox("[PREMIUM] Dostajesz 200z? za pelna godzine gry!.",v255,255,0trueend 
end 
end 
setTimer kasa3600000 9999 )

Server:
function premium thePlayer_, ... )
    local message table.concat ( { ... }, " " )
    if ( isPlayerOnGroup thePlayer ) ) then
        for _player in ipairs getElementsByType "player" ) ) do
            if ( isPlayerOnGroup player ) ) then
              outputChatBox "#FFFF00[PREMIUM]#FFFFFF".. getPlayerName thePlayer ) ..": #FFFF00".. messageplayer255255255true )
            end
        end
    else
        outputChatBox "#FFFF00*Nie posiadasz aktywnego konta premium."thePlayer255255255true )
    end
end
addCommandHandler "v"premium )
 
function isPlayerOnGroup thePlayer )
    local account getPlayerAccount thePlayer )
    local inGroup false
    for _group in ipairs ( { "Premium" } ) do  
        if isObjectInACLGroup "user.".. getAccountName account ), aclGetGroup group ) )   then
            inGroup true
            break
        end
    end
 
    return inGroup
end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-04, 14:29


=DC=







Wiek: 35
Na forum: 3944 dni
Posty: 223
Nick w MP: =DC=

Piwa: 72

Respekt: 150
Respekt: 150Respekt: 150

Przy logowaniu je?li gracz jest vipem to nadaj mu warto??
setElementData(gracz"gracz_premium"1)

Oczywi?cie zmienn? gracz podmie? na tak? jak? u?ywasz w panelu logowania.

Podpis

Witaj
, jeśli Ci pomogłem postaw mi :piwo: lub R* Dzięki!

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-04, 15:24


STOPseba

Emeryt na scenie MTA






Wiek: 25
Na forum: 3771 dni
Posty: 448
Nick w MP: STOPseba

Piwa: 5014

Respekt: 576,3
Respekt: 576,3

"=DC=" napisał/a:

Przy logowaniu je?li gracz jest vipem to nadaj mu warto??
setElementData(gracz"gracz_premium"1)

Oczywi?cie zmienn? gracz podmie? na tak? jak? u?ywasz w panelu logowania.

a jak to zrobi? bo akurat w tym to zielony jestem :D

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-04, 15:31


=DC=







Wiek: 35
Na forum: 3944 dni
Posty: 223
Nick w MP: =DC=

Piwa: 72

Respekt: 150
Respekt: 150Respekt: 150

Zapewne masz to na ACL :
addEventHandler("onPlayerLogin" root, function()
local konto getAccountName getPlayerAccount source ) )
if isObjectInACLGroup ("user."..kontoaclGetGroup "VIP" ) ) then
setElementData(source"gracz_premium"1)
end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-04, 15:51


STOPseba

Emeryt na scenie MTA






Wiek: 25
Na forum: 3771 dni
Posty: 448
Nick w MP: STOPseba

Piwa: 5014

Respekt: 576,3
Respekt: 576,3

"=DC=" napisał/a:

Zapewne masz to na ACL :
addEventHandler("onPlayerLogin" root, function()
local konto getAccountName getPlayerAccount source ) )
if isObjectInACLGroup ("user."..kontoaclGetGroup "VIP" ) ) then
setElementData(source"gracz_premium"1)
end
end)

Sorry mo?e to g?upie pytanie ale gdzie to wstawi??

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-04, 15:53


=DC=







Wiek: 35
Na forum: 3944 dni
Posty: 223
Nick w MP: =DC=

Piwa: 72

Respekt: 150
Respekt: 150Respekt: 150

Wstaw to na sam d?? pliku server i zmie? "VIP"

if isObjectInACLGroup ("user."..kontoaclGetGroup "VIP" ) ) then 

na nazw? grupy ACL jak? ma u ciebie vip.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-04, 16:12


STOPseba

Emeryt na scenie MTA






Wiek: 25
Na forum: 3771 dni
Posty: 448
Nick w MP: STOPseba

Piwa: 5014

Respekt: 576,3
Respekt: 576,3

function premium thePlayer_, ... )
    local message table.concat ( { ... }, " " )
    if ( isPlayerOnGroup thePlayer ) ) then
        for _player in ipairs getElementsByType "player" ) ) do
            if ( isPlayerOnGroup player ) ) then
              outputChatBox "#FFFF00[PREMIUM]#FFFFFF".. getPlayerName thePlayer ) ..": #FFFF00".. messageplayer255255255true )
            end
        end
    else
        outputChatBox "#FFFF00*Nie posiadasz aktywnego konta premium."thePlayer255255255true )
    end
end
addCommandHandler "v"premium )
 
function isPlayerOnGroup thePlayer )
    local account getPlayerAccount thePlayer )
    local inGroup false
    for _group in ipairs ( { "Premium" } ) do  
        if isObjectInACLGroup "user.".. getAccountName account ), aclGetGroup group ) )   then
            inGroup true
            break
        end
    end
 
    return inGroup
end

addEventHandler("onPlayerLogin" root, function()
local konto getAccountName getPlayerAccount source ) )
if isObjectInACLGroup ("user."..kontoaclGetGroup "Premium" ) ) then
setElementData(source"gracz_premium"1)
end
end)

Zrobi?em tak i dalej nie moge bra? tych skin?w

Podpis



Kontakt
Discord: STOPseba#7603
STOPseba na fejsie
Messenger


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-04, 16:17


=DC=







Wiek: 35
Na forum: 3944 dni
Posty: 223
Nick w MP: =DC=

Piwa: 72

Respekt: 150
Respekt: 150Respekt: 150

Zamie? to na ko?cu server na to poni?ej
addEventHandler("onPlayerLogin" root, function()
local konto getAccountName getPlayerAccount source ) )
if isObjectInACLGroup ("user."..kontoaclGetGroup "Premium" ) ) then
setElementData(source"gracz_premium"1)
outputChatBox "#FFFF00*Posiadasz aktywne konta premium."source255255255true )
end
end)


I powiedz czy po zalogowaniu pokazuje na czacie:
"*Posiadasz aktywne konta premium."

Podpis

Witaj
, jeśli Ci pomogłem postaw mi :piwo: lub R* Dzięki!

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-04, 16:26


STOPseba

Emeryt na scenie MTA






Wiek: 25
Na forum: 3771 dni
Posty: 448
Nick w MP: STOPseba

Piwa: 5014

Respekt: 576,3
Respekt: 576,3

nic nie wyskakuje

Podpis



Kontakt
Discord: STOPseba#7603
STOPseba na fejsie
Messenger


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-04, 16:27


=DC=







Wiek: 35
Na forum: 3944 dni
Posty: 223
Nick w MP: =DC=

Piwa: 72

Respekt: 150
Respekt: 150Respekt: 150

To znaczy ?e nie doda?e? swojego konta do ACL "Premium" :)

Podpis

Witaj
, jeśli Ci pomogłem postaw mi :piwo: lub R* Dzięki!

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-04, 16:32


STOPseba

Emeryt na scenie MTA






Wiek: 25
Na forum: 3771 dni
Posty: 448
Nick w MP: STOPseba

Piwa: 5014

Respekt: 576,3
Respekt: 576,3

napewno jestem dodany tego jestem pewien xd

[ Dodano: 2016-08-04, 16:34 ]
mo?e co? z?e skopiowa?em

Podpis



Kontakt
Discord: STOPseba#7603
STOPseba na fejsie
Messenger


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-04, 16:34


=DC=







Wiek: 35
Na forum: 3944 dni
Posty: 223
Nick w MP: =DC=

Piwa: 72

Respekt: 150
Respekt: 150Respekt: 150

Na 100% sie nazywa Premium a nie premium ?
Jakie? b??dy w /debugscript 3 ?

Podpis

Witaj
, jeśli Ci pomogłem postaw mi :piwo: lub R* Dzięki!

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-04, 16:36


STOPseba

Emeryt na scenie MTA






Wiek: 25
Na forum: 3771 dni
Posty: 448
Nick w MP: STOPseba

Piwa: 5014

Respekt: 576,3
Respekt: 576,3

na 100%Premium b??d?w 0

Podpis



Kontakt
Discord: STOPseba#7603
STOPseba na fejsie
Messenger


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-04, 16:37


=DC=







Wiek: 35
Na forum: 3944 dni
Posty: 223
Nick w MP: =DC=

Piwa: 72

Respekt: 150
Respekt: 150Respekt: 150

To zamie? jeszcze tak:

addEventHandler("onPlayerLogin" root, function(thePlayer)
local konto getAccountName getPlayerAccount thePlayer ) )
if isObjectInACLGroup ("user."..kontoaclGetGroup "Premium" ) ) then
setElementData(thePlayer"gracz_premium"1)
outputChatBox "#FFFF00*Posiadasz aktywne konta premium."thePlayer255255255true )
end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-04, 16:40


STOPseba

Emeryt na scenie MTA






Wiek: 25
Na forum: 3771 dni
Posty: 448
Nick w MP: STOPseba

Piwa: 5014

Respekt: 576,3
Respekt: 576,3

[2016-08-04 16:39] ERROR: Loading script failed: seba-Premium/Server.lua:28: ')' expected near 'root'

[ Dodano: 2016-08-04, 16:41 ]
Pewnie co? zle wklejam xd

Podpis



Kontakt
Discord: STOPseba#7603
STOPseba na fejsie
Messenger


Postaw piwo autorowi tego posta
 

 
Tagi: premium
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA 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