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

Wysłany: 2012-11-26, 10:41


cayman11







Wiek: 30
Na forum: 4947 dni
Posty: 73



Respekt: 50

Siemkaaaa
Hmm mam taki problem a mianowicie chodzi mi o take co? ?eby po wej?ciu na serwer wyskoczy? panel logowania i jak kto? si? zaloguje to ?eby m?g? potem wybra? skina.
Mam ju? panel wybierania skina a panel logowania Community :E
ale nie wiem jak zrobi? to co u g?ry pisa?em.

Mam nadzieje ze kto? pomo?e :P

Kod wybierania skina

local xguiGetScreenSize()

SkinMusic "data/music/SkinSelectMusic.ogg"
SkinAnims = {"dnce_M_b","DAN_Left_A","DAN_Down_A","DAN_Loop_A"}
StartSkin 0
SkinJobText ""
SkinJobColor = {255,255,255}
NewSkin false

SkinDescriptions = {"Wybierz Skina","Street Racer","","","","","","","News Lady","Old Grandmother","Barmaid",
"Model","Gangsta Biatch","Old Man","Truck Man","Road Worker","IT Man","BeachGuard","Gangsta","Ladies Man",
"Rapper","Hip Hop Dancer","Skater","Gangsta","Ladies Man","Tourist","Builder","Drug Dealer",
"Drug Dealer","Mexican Gangsta","Horse Breeder","Fisherman","Captain","Horseman","Fisherman",
"Mailman","Mailman","Old Woman","Grandmother","Pretty Girl","Sportswoman",
"Sportswoman","Taxi Driver","Salesman","Lifeguard","Ladies Man","Mexican Gangster","Taxi Driver",
"Restaurant Owner","Engineer","Sportsman","Sportsman",
"Gardener","Old Lady","Slut","Slut","Businessman","Gardener","Ladies man","Dork","Pilot","Prisoner",
"Slut","Slut","Slut","Drug Dealer","Bus Driver","Priest","Florist",
"Butcher","Police Officer","Truck Man","Truck Man","Truck Man","Slut","Businesswoman","Homeless",
"Homeless","Homeless","Boxer","Boxer","Elvis","Elvis","Elvis",
"Slut","Slut","Porn Star","Gardener","Old Lady","Slut","Dancer","Babe","Dancer","Golfer","Farmer",
"Athlete","Lifeguard","Dork","Sportman","Motorcyclist","Drug Addict",
"Bloods Gangsta","Blood Gangsta","Bloods Gangsta Leader","Crove Gangsta","Crove Gangsta","Crove Gangsta",
"Mexican Gangsta","Mexican Gangsta","Mexican Gangsta",
"Russian Mafioso","Russian Mafioso","Mayor","Crips Gangsta","Crips Gangsta","Crips Gangsta","Chinese Mafioso",
"Chinese Mafioso","Chinese Mafioso","Chinese Mafioso",
"Japanese Gangster","Japanese Gangster","Japanese Gangster","Italian Mafioso","Italian Mafioso",
"Italian Mafioso","German Guy","Motorcyclist","Old Lady",
"Farmer","Wild Child","Hippy","Truck Man","Homeless","Homeless","Taxi Driver","Homeless","Slut","Slut","Slut",
"Businesswoman","Bus Driver","Taxi Driver",
"Artist","Slut","Artist","Mayor","News Anchor","News Anchor","Secretary","Fat Slut","Slut","Project Manager",
"Lifeguard","Pizza Boy","Hairdresser","Farmer","Farmer",
"Farmer","Farmer","Farmer","Combine Head","Security Guard","Security Guard","Security Guard","Security Guard",
"Seller","Butcher","Chinese Slut","Chinese Guy",
"Casino Employees","Casino Employees","Street Racer","Street Racer","Street Racer","Hairdresser","Hairdresser",
"Porn Star","Mercenary","Tattoo Maker","Drunkard",
"Taxi Driver","Bus Driver","Thief","Ladys Man","Chinese businessman","Business Man","Simple Man","Actor",
"Black Lady","Dumped Lady","Lady","Student","BodyGuard",
"Gangsta Biatch","Old Woman","Old Lady","Farmer","Homewive","Homeless Farmer","Truck Driver Lady",
"Truck Driver","Kung-Fu Man","Kung-Fu Man","Hamburger Lady",
"Truck Driver","Black Woman","Black Woman","Pizza Man","Simple Boy","Staff Lady","Homeless Man",
"Homeless Drunk Guy","Important Lady","Black Old Woman","Beatiful Lady",
"Staff Man","Old Lady","Office Girl","Beach Party Man","Club Dancer","Beach Man","Club Man","China Woman",
"China Lady","Student Girl","Business Man",
"Business Man","China Man","Homeless Guy","Simple Grandmother","Gangsta Grandmother","Lady","Vehicle Driver",
"Old Man","Simple Guy","Cute Woman","Prostitute",
"Homeless Man","Gentelman","Disko man","Big Show","Prostitute","Prostitute","Big Woman","Cop Stripper",
"Bikers Member","Bikers Member","Beaver Skin Trader",
"Formal Man","Swimming Woman","Swimming Man","Taxi Driver","Bikers Boss","Plane Pilot","School Girl?",
"Naked Lady","Golf Club Member","Golf Club Member",
"Road Worker","Drunk Man","Drunk Fat Man","Loyal Woman","Clown","Police Officer","Police Officer",
"Police Officer","Car Painter","Gangster","Gangster","Gangster",
"Mafia Member","Mafia Member","Medic","Medic","Medic","Firefighter","Firefighter","Firefighter",
"Police Officer","Police Officer","Police Officer","Police Officer",
"Police Officer","Police Officer","Police Officer","Police Officer","Police Officer","Police Officer",
"Normal Man","Punk","Ceasar","Tatoo Man","Blind Man","Business Man",
"Pimp The Real","DJ","Cheating Woman","Stupid Boy","Real Gangster","The Boss","Soldier Ryan","Pimp G**",
"Gangsta Biatch","Motor Mechanic","Computer Freak","Weird Man",
"Beckham Fan","Car Painter","Tehnology Boy","Big Show","Ex-Captain"}

function SelectSkin ()
    setElementInterior getLocalPlayer(), 00,0,)
    setCameraMatrix3878.8999023438,-1610.0999755859,17.13878.9900488281,-1607.4000244141,16.5)
    skin createPed StartSkin3878.9900488281,-1608.4000244141,16.3,180 )
    setPedAnimationskin"DANCING"SkinAnims[math.random(1,4)])
    fadeCameratrue5)
    setTime(0,0)
    SkinSelectMusic playSound(SkinMusic,true)
    bindKey("arrow_r","down",NextSkin)
    bindKey("arrow_l","down",LastSkin)
    bindKey("lshift","down",SpawnPlayer)
    addEventHandler("onClientRender",getRootElement(),AnnounceSkinJob)
    showCursor(true)
end

addEventHandler"onClientResourceStart"getResourceRootElement(getThisResource()),
function()
    SelectSkin()
    FreezeBots()
end)

function NextSkin()
    if StartSkin == 312 then
        StartSkin = -1
    elseif StartSkin == 2 then
        StartSkin 8
    end
        StartSkin StartSkin 1
        setElementModel(skin,StartSkin)
        setPedAnimationskin"DANCING"SkinAnims[math.random(1,4)])
        SkinJobTextColor()
end

function LastSkin()
    if StartSkin == 0 then
        StartSkin 313
    elseif StartSkin == 9 then
        StartSkin 3
    end
        StartSkin StartSkin 1
        setElementModel(skin,StartSkin)
        setPedAnimationskin"DANCING"SkinAnims[math.random(1,4)])
        SkinJobTextColor()
end

function SkinJobTextColor()
    if SkinDescriptions[StartSkin] == "Medic" then
        SkinJobColor = {200,0,200}
    elseif SkinDescriptions[StartSkin] == "Police Officer" then
        SkinJobColor = {0,0,200}
    elseif SkinDescriptions[StartSkin] == "Firefighter" then
        SkinJobColor = {200,0,0}
    elseif SkinDescriptions[StartSkin] == "Homeless" then
        SkinJobColor = {0,200,0}
    else
        SkinJobColor = {200,200,200}
    end
end

function AnnounceSkinJob()
    if SkinDescriptions[StartSkin] == nil then
        SkinJobText "Wybierz Skina"
    else
        SkinJobText SkinDescriptions[StartSkin]
    end
dxDrawTextSkinJobText0y/2.2xytocolor SkinJobColor[1],SkinJobColor[2],SkinJobColor[3], 255 ), 3.02"default-bold","center" dxDrawRectangle x-x/1.5y/1.23x/3y/20tocolor 000230 ) )
end

function SpawnPlayer()
    local r,g,math.random(0,255),math.random(0,255),math.random(0,255)
    triggerServerEvent "onClientWantsToSpawn"getLocalPlayer(), getLocalPlayer(),StartSkin,r,g,)
    unbindKey("arrow_r","down",NextSkin)
    unbindKey("arrow_l","down",LastSkin)
    unbindKey("lshift","down",SpawnPlayer)
    setTime(12,0)
    stopSound(SkinSelectMusic)
    removeEventHandler("onClientRender",getRootElement(),AnnounceSkinJob)
    showCursor(false)
    guiSetVisible(lnextskin,false)
    guiSetVisible(rnextskin,false)
    guiSetVisible(spawnskin,false)
    setElementData(getLocalPlayer(),"red",r)
    setElementData(getLocalPlayer(),"green",g)
    setElementData(getLocalPlayer(),"blue",b)
end

lnextskin guiCreateButton(x-x/1.54,y/1.22,x/11,y/34,"<<<",false)
guiSetProperty(lnextskin,"PushedTextColour","FFFF0000")
rnextskin guiCreateButton(x-x/1.83,y/1.22,x/11,y/34,">>>",false)
guiSetProperty(rnextskin,"PushedTextColour","FFFF0000")
spawnskin guiCreateButton(x-x/2.25,y/1.22,x/11,y/34,"Spawn",false)
guiSetProperty(spawnskin,"PushedTextColour","FFFF0000")

addEventHandler"onClientGUIClick"getRootElement(), function()
    if source == lnextskin then
        LastSkin()
    elseif source == rnextskin then
        NextSkin()
    elseif source == spawnskin then
        SpawnPlayer()
    end
end)

------PEDS

WeaponSeller createPed 30296.390625,-40.2216796875,1001.515625 )
setElementInterior WeaponSeller1296.390625,-40.2216796875,1001.515625 )
setPedAnimationWeaponSeller"BAR""BARman_idle")

BurgerSeller createPed 167374.7841796875,-117.27734375,1001.4921875,180 )
setElementInterior BurgerSeller5374.7841796875,-117.27734375,1001.4921875 )
setPedAnimationBurgerSeller"GANGS""hndshkcb")

function FreezeBots()
    local Bots getElementsByType("ped")
        for k,v in ipairs(Bots) do
        setElementFrozen(v,true)
    end
end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-11-26, 11:09


Nestor







Wiek: 29
Na forum: 5156 dni
Posty: 3
Nick w MP: Spamer :D



Respekt: 50

Nie rozumiem ci? do Ko?ca ;x

Podpis

pomogłem Ci? Postaw piffko!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-11-26, 15:27


Piorun







Wiek: 32
Na forum: 6712 dni
Posty: 1837
Nick w MP: Piorun

Piwa: 516

Respekt: 480,7
Respekt: 480,7

Nie pomagamy w skryptach, kt?re nie s? autorstwa autora tematu, bo potem si? robi zamieszanie i "burdel", a temat ci?gnie si? przez nast?pne 10 stron bez skutku.

Podpis
Możesz mnie znaleźć na: Facebook
Postaw piwo autorowi tego posta
 

 
Tagi: wybieranie :: skina :: panel :: logowania
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