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

Wysłany: 2014-06-01, 18:38


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4401 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

wklejasz co ma si? dzia? po wpisaniu tej komendy.

Do ustawiania animacji funkcja : https://wiki.multitheftauto.com/wiki/SetPedAnimation

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-01, 18:44


adwokatPL

*Uczę się*






Wiek: 25
Na forum: 4547 dni
Posty: 59
Nick w MP: Skibcus



Respekt: 50

Dobra wiem

Ostatnio zmieniony przez adwokatPL 2014-06-01, 18:47, w całości zmieniany 2 razy  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-01, 18:46


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4401 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

w F1/Freeroam masz tam ANIM. Klikasz w to Wybierasz kategori? i nazw?


setPedAnimation ( plr, "GRUPA", "NAZWA_ANIMKI" )

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-01, 18:55


adwokatPL

*Uczę się*






Wiek: 25
Na forum: 4547 dni
Posty: 59
Nick w MP: Skibcus



Respekt: 50

A co doda? aby sko?czy? animacj??
Np: Enter

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-01, 18:58


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4401 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

dodajesz setPedAnimation ( element, false )

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-01, 19:00


adwokatPL

*Uczę się*






Wiek: 25
Na forum: 4547 dni
Posty: 59
Nick w MP: Skibcus



Respekt: 50

a ?eby by? zbindowany pod enter? BindKey = Enter

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-01, 19:02


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4401 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

bindKey ( "enter", "down", function()
setPedAnimation (getLocalPlayer(), false )
end)



c-side

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-01, 20:52


Dexnes_

Tiger






Wiek: 26
Na forum: 4408 dni
Posty: 620
Nick w MP: Dexnes

Piwa: 1394

Respekt: 390
Respekt: 390Respekt: 390Respekt: 390Respekt: 390

Witam mam problem

tutaj mam mete
<meta>
<info author="BlackGAmePL" name="moj script" version="1.1" desc="moj"/>
<script src="scripts/login/login_s.lua" type="server" />
<script src="scripts/login/login_c.lua" type="client" />
</meta>


Tutaj jest Lua


-- definicje
sWidth, sHeight = guiGetScreenSize()
anims = {"dnce_M_b","DAN_Left_A","DAN_Down_A","DAN_Loop_A"}
StartSkin = 0
NewSkin = false
local localPlayer = getLocalPlayer()
local x = 1024
local y = 768
local sm = {}
sm.moov = 0
sm.object1, sm.object2 = nil, nil
local months = {
[0] = "stycznia",
[1] = "lutego",
[2] = "marca",
[3] = "kwietnia",
[4] = "maja",
[5] = "czerwca",
[6] = "lipca",
[7] = "sierpnia",
[8] = "wrze?nia",
[9] = "pa?dziernika",
[10] = "listopada",
[11] = "grudnia"
}

local function camRender ()
if isElement(sm.object1) and (sm.object2) then
local x1, y1, z1 = getElementPosition ( sm.object1 )
local x2, y2, z2 = getElementPosition ( sm.object2 )
setCameraMatrix ( x1, y1, z1, x2, y2, z2 )
end
end

local function removeCamHandler ()
if(sm.moov == 1) then
sm.moov = 0
removeEventHandler ( "onClientPreRender", getRootElement(), camRender )
end
end


function smoothMoveCamera ( x1, y1, z1, x1t, y1t, z1t, x2, y2, z2, x2t, y2t, z2t, time )
if(sm.moov == 1) then return false end
sm.object1 = createObject ( 1337, x1, y1, z1 )
sm.object2 = createObject ( 1337, x1t, y1t, z1t )
setElementAlpha ( sm.object1, 0 )
setElementAlpha ( sm.object2, 0 )
setObjectScale(sm.object1, 0.01)
setObjectScale(sm.object2, 0.01)
moveObject ( sm.object1, time, x2, y2, z2, 0, 0, 0, "InOutQuad" )
moveObject ( sm.object2, time, x2t, y2t, z2t, 0, 0, 0, "InOutQuad" )

addEventHandler ( "onClientPreRender", getRootElement(), camRender )
sm.moov = 1
return true
end







--//

login_edit = guiCreateEdit((93/x)*sWidth, (231/y)*sHeight, (271/x)*sWidth, (44/y)*sHeight, ""..getPlayerName(getLocalPlayer()), false)
guiEditSetMaxLength(login_edit, 50)
haslo_edit = guiCreateEdit((93/x)*sWidth, (400/y)*sHeight, (271/x)*sWidth, (44/y)*sHeight, "", false)
guiEditSetMasked(haslo_edit, true)
guiEditSetMaxLength(haslo_edit, 50)
login_btn = guiCreateButton((148/x)*sWidth, (508/y)*sHeight, (156/x)*sWidth, (49/y)*sHeight, "Zaloguj si?", false)
guiSetProperty(login_btn, "NormalTextColour", "FFAAAAAA")
register_btn = guiCreateButton((148/x)*sWidth, (582/y)*sHeight, (156/x)*sWidth, (49/y)*sHeight, "Zarejestruj si?", false)
guiSetProperty(register_btn, "NormalTextColour", "FFAAAAAA")

function renderujemy()
dxDrawRectangle((86/x)*sWidth, (0/y)*sHeight, (285/x)*sWidth, (768/y)*sHeight, tocolor(0, 0, 0, 200), false)
dxDrawImage((87/x)*sWidth, (8/y)*sHeight, (300/x)*sWidth, (100/y)*sHeight, ":fullgaming/files/banner_logo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
dxDrawLine((370/x)*sWidth, (0/y)*sHeight, (370/x)*sWidth, (767/y)*sHeight, tocolor(255, 255, 255, 255), 2, true)
dxDrawLine((86/x)*sWidth, (0/y)*sHeight, (86/x)*sWidth, (767/y)*sHeight, tocolor(255, 255, 255, 255), 2, true)
dxDrawText("Nick", (152/x)*sWidth, (153/y)*sHeight, (351/x)*sWidth, (222/y)*sHeight, tocolor(255, 255, 255, 255), 1.6, "bankgothic", "left", "top", false, false, true, false, false)
dxDrawText("Has?o", (129/x)*sWidth, (318/y)*sHeight, (328/x)*sWidth, (387/y)*sHeight, tocolor(255, 255, 255, 255), 1.6, "bankgothic", "left", "top", false, false, true, false, false)
end
addEventHandler("onClientRender", root, renderujemy)


function init()
triggerServerEvent("destroyCosiek", root, getLocalPlayer())
smoothMoveCamera(-1592,756,80, -1592,756,80, 2140, 1348, 70, 2140, 1348, 70, 150000)
muzyka = playSound(":fullgaming/files/FullGaming.mp3")
setSoundVolume(muzyka, 0.70)
showCursor(true)
showPlayerHudComponent("all", false)
showChat(false)
guiSetInputEnabled(true)
removeEventHandler("onClientRender", getRootElement(), td)
end
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), init)

function tdInit()
addEventHandler("onClientRender", getRootElement(), td)
end
addEvent("renderTD", true)
addEventHandler("renderTD", getRootElement(), tdInit)

function login(button, state)
if button == "left" and state == "up" then
local username = guiGetText(login_edit)
local password = guiGetText(haslo_edit)
if string.len(username) < 5 or string.len(password) < 5 then
showBox("error", "D?ugo?? nicku lub has?a jest zbyt kr?tka.")
return
end
if username and password then
triggerServerEvent("probaLogowania", getRootElement(), localPlayer, username, password)
else
showBox("info","Wpisz sw?j login i has?o.")
end
end
end

function register(button, state)
if button == "left" and state == "up" then
local username = guiGetText(login_edit)
local password = guiGetText(haslo_edit)
if string.len(username) < 5 or string.len(password) < 5 then
showBox("error", "D?ugo?? nicku lub has?a jest zbyt kr?tka.")
return
end
if username and password then
triggerServerEvent("probaRejestracji", getRootElement(), localPlayer, username, password)
else
showBox("info","Wpisz sw?j login i has?o.")
end
end
end

function wybieralkaInfo()
dxDrawText("#ffffffWybierz sw?j model postaci. Aby przewija? modele - u?yj #FF9900strza?ek, #ffffffaby zatwierdzi? naci?nij klawisz #FF9900ENTER.", (0/1680)*sWidth, (856/1024)*sHeight, (1679/1680)*sWidth, (905/1024)*sHeight, tocolor(255, 255, 255, 255), 1.5, "default-bold", "left", "top", false, false, true, true, false)
dxDrawText("Wybierz sw?j model postaci. Aby przewija? modele - u?yj strza?ek, aby zatwierdzi? naci?nij klawisz ENTER.", (2/1680)*sWidth, (856/1024)*sHeight, (1681/1680)*sWidth, (905/1024)*sHeight, tocolor(0, 0, 0, 255), 1.5, "default-bold", "left", "top", false, false, false, false, false)
end

function wylaczPanelLogowania()
fadeCamera(false, 0, 0, 0, 0)
setTimer(fadeCamera, 2000, 1, true, 1.0)
removeEventHandler("onClientRender", getRootElement(), renderujemy)
--showPlayerHudComponent("all", true)
--showCursor(false)
guiSetInputEnabled(false)
--setCameraTarget(getLocalPlayer())
destroyElement(login_btn)
destroyElement(register_btn)
destroyElement(login_edit)
destroyElement(haslo_edit)
--stopSound(muzyka)
destroyElement(sm.object1)
destroyElement(sm.object2)
removeCamHandler()
setCameraMatrix(-2662, 1587, 226, -2662, 1594, 225) -- -2600 1596 225 -2662 1594 225
skin = createPed(StartSkin, -2662, 1594, 225, 180)
setPedAnimation( skin, "DANCING", anims[math.random(1,4)])
setElementFrozen(skin, true)
addEventHandler("onClientRender", root, wybieralkaInfo)
bindKey("arrow_r","down",NextSkin)
bindKey("arrow_l","down",LastSkin)
bindKey("enter", "down", zalogowany)
end

function NextSkin()
if StartSkin == 312 then
StartSkin = -1
elseif StartSkin == 2 then
StartSkin = 8
end
StartSkin = StartSkin + 1
local x,y,z = getElementPosition(skin)
setElementModel(skin,StartSkin)
setPedAnimation( skin, "DANCING", anims[math.random(1,4)])
fxAddGlass(x,y,z + 0.5, math.random(0, 255), math.random(0, 255), math.random(0, 255), 255, 0.15, 5)
setElementPosition(skin, -2662, 1594, 225)
end
function LastSkin()
if StartSkin == 0 then
StartSkin = 313
elseif StartSkin == 9 then
StartSkin = 3
end
StartSkin = StartSkin - 1
local x,y,z = getElementPosition(skin)
setElementModel(skin,StartSkin)
setPedAnimation( skin, "DANCING", anims[math.random(1,4)] )
fxAddGlass(x,y,z + 0.5, math.random(0, 255), math.random(0, 255), math.random(0, 255), 255, 0.15, 5)
setElementPosition(skin, -2662, 1594, 225)
end


function fadeOutAudio()
if not muzyka then return end
local vol=getSoundVolume(muzyka)
vol=vol-0.1
if (vol<0) then
stopSound(muzyka)

muzyka=nil
return
end
setSoundVolume(muzyka,vol)
setTimer(fadeOutAudio, 300, 1)
end

function zalogowany()
unbindKey("arrow_r","down",NextSkin)
unbindKey("arrow_l","down",LastSkin)
unbindKey("enter","down",zalogowany)
setElementData(localPlayer, "skin", StartSkin)
setCameraTarget(getLocalPlayer())
showPlayerHudComponent("all", true)
showPlayerHudComponent("area_name", false)
showPlayerHudComponent("vehicle_name", false)
showPlayerHudComponent("wanted", false)
showCursor(false)
setTimer(fadeOutAudio, 1000, 1)
removeEventHandler("onClientRender", root, wybieralkaInfo)
addEventHandler("onClientRender", root, td)
callServerFunction("spawn", localPlayer)
local teraz = getRealTime()
local lastonline = getRealTime(getElementData(localPlayer, "ostanioOnline")) or "To jest twoja pierwsza wizyta"
outputChatBox("Witaj, "..getPlayerName(localPlayer), 0, 102, 255)
outputChatBox("Twoja ranga : "..getElementData(localPlayer, "Ranga") or "Gracz", 0, 102, 255)
outputChatBox("Ostatnio online: "..lastonline.monthday.." "..months[lastonline.month].." ".. 1900 + lastonline.year.." o "..("%02d"):format(lastonline.hour)..":"..("%02d"):format(lastonline.minute), 0, 102, 255)
outputChatBox("Nie posiadasz konta VIP.", 0, 102, 255)
outputChatBox("Mi?ej gry, ?yczy administracja.", 0, 102, 255)
setElementData(localPlayer, "ostatnioOnline", tonumber(teraz.timestamp))
end



addEvent("HideGUI", true)
addEventHandler("HideGUI", root, wylaczPanelLogowania)
addEventHandler("onClientGUIClick", login_btn, login, false)
addEventHandler("onClientGUIClick", register_btn, register, false)

A tutaj jest 2.



function logowanie(player, username, password)
local account = getAccount(username, password)
if (account ~= false) then
if (logIn(player, account, password) == true) then
setCameraTarget(player,player)
--setElementPosition(player,251,-1801,6) -- 251 -1801 5
--outputChatBox("If you want to change your password, use /changepw", player)
triggerClientEvent (player, "HideGUI", getRootElement())
-- triggerClientEvent(player, "renderTD", getRootElement())
else
triggerClientEvent(player, "CreateBox", getRootElement(), "error", "Uzupe?nij pole 'login' i 'has?o'.")
end
end
end

addEvent("probaLogowania", true)
addEventHandler("probaLogowania", getRootElement(), logowanie)


function rejestracja(player, username, password)
local account = getAccount(username, password)
if (account ~= false) then
else
account = addAccount(username, password)
if (logIn(player, account, password) == true) then
setCameraTarget(player,player)
spawn(player)
triggerClientEvent(player, "CreateBox", getRootElement(), "info", "Zarejestrowa?e? si? pomy?lnie! Witamy na fullgaming.")
--setElementPosition(player, 0,0,0)
--outputChatBox("If you want to change your password, use /changepw", player)
triggerClientEvent(player, "HideGUI", getRootElement())
-- triggerClientEvent(player, "renderTD", getRootElement())

end
end
end

addEvent("probaRejestracji", true)
addEventHandler("probaRejestracji", getRootElement(), rejestracja)
--addCommandHandler("mysqltest", rejestracja)

function resourceStop ()
setElementData(source, "admin", nil)
setElementData(source, "vip", nil)
setElementData(source, "exp", nil)
setElementData(source, "money", nil)
setElementData(source, "datetime", nil)
setElementData(source, "loggedin", nil)
end
addEventHandler("onResourceStop", getRootElement(), resourceStop)
addEventHandler("onPlayerQuit", getRootElement(), resourceStop)


addEventHandler("onPlayerJoin", root,
function(gracz)
if isElement(gracz) and getElementType(gracz) == "player" then
fadeCamera(gracz, true)
showPlayerHudComponent(gracz, "all", true)
setElementData(gracz, "Respekt", 0)
setElementData(gracz, "Level", 0)
setElementData(gracz, "Ranga", "Gracz")
serverDisplayo = textCreateDisplay() -- create a text display
textDisplayAddObserver ( serverDisplay, gracz ) -- make it visible to a player
serverTexto = textCreateTextItem ( "Witaj na serwerze FullGaming.pl.\nAktualnie trwa pobieranie zasob?w serwera.\nJeste? ciekaw co dla ciebie oferujemy? Chcesz pozna? atrakcje serwera?\nZosta? z nami i poczekaj :) .", 0.75, 0.5, "high", 0, 153, 255, 255, 255, 1.5, "right", "bottom", 200 ) -- create a text item for the display
textDisplayAddText ( serverDisplay, serverText ) -- add it to the display so it is displayed
spawn(gracz)
end
end)

function destroyTextdispJoin(gracz)
if isElement(gracz) and getElementType(gracz) == "player" then
if serverDisplayo then
textDisplayRemoveObserver(serverDisplayo, gracz)
end
end
end
addEvent("destroyCosiek", true)
addEventHandler("destroyCosiek", root, destroyTextdispJoin)
function logoutAll ()
local players = getElementsByType ( "player" ) -- Get every player
for k, player in ipairs ( players ) do -- For every player do the following...
account = getPlayerAccount ( player ) -- Get every player's account
if ( not isGuestAccount ( account ) ) then -- For every player that's logged in....
logOut ( player ) -- Log them out.
end
end
end
-- Trigger it when the resource (re)starts
addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), logoutAll )






To tak o co chodzi jak mam w mecie w razy client to w konsoli sie wlacza ale jak jest w mecie serwer i client to sie nie chce w konsoli w??czy?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-01, 20:52


adwokatPL

*Uczę się*






Wiek: 25
Na forum: 4547 dni
Posty: 59
Nick w MP: Skibcus



Respekt: 50

Kod:

addCommandHandler ( "jedz", function(plr)
setPedAnimation ( plr, "POLICE", "CopTraf_Come" )
end)

jak ma to dok?adnie wygl?da? razem z:
Kod:

bindKey ( "enter", "down", function()
setPedAnimation ( getLocalPlayer(), false )
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-01, 20:54


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4401 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

adwokatPL, je?li da?e? dobr? kategori?, to powinno dzia?a?. Sprawd?

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-01, 20:56


Dexnes_

Tiger






Wiek: 26
Na forum: 4408 dni
Posty: 620
Nick w MP: Dexnes

Piwa: 1394

Respekt: 390
Respekt: 390Respekt: 390Respekt: 390Respekt: 390

Panie Maszyno pomozesz mi?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-01, 21:00


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4401 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Wklej kawa?ek kodu gdzie jest b??d, nie b?d? analizowa? tylu linijek.

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-01, 21:15


Dexnes_

Tiger






Wiek: 26
Na forum: 4408 dni
Posty: 620
Nick w MP: Dexnes

Piwa: 1394

Respekt: 390
Respekt: 390Respekt: 390Respekt: 390Respekt: 390

Juz nie trzeba znalaz?em inny xD

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-01, 21:41


adwokatPL

*Uczę się*






Wiek: 25
Na forum: 4547 dni
Posty: 59
Nick w MP: Skibcus



Respekt: 50

A m?g?by? zrobi? aby by? panel do TP ludzi do wi?zienia (Mog? wpisa? coordy gdzie ma tp) czyli wyb?r Nicku i przycisk Wi?zienie i TP danego gracza na okre?lony czas do wi?zienia (czyli ustalonych wcze?niej coord?w)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-01, 21:45


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4401 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Nie mam czasu na takie rzeczy i zachcianki. Musisz sam si? nauczy? takiego co? robi?, bo jak kiedy? co? bd chcia? zrobi? lub naprawi? u Siebie na serwie to Sobie nie poradzisz. Jedynie mog? pom?c Ci ze szczeg??ami, czyli jak doda? wszystkich graczy do gridlist, jak pobra? je itp.

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Tagi: szukam :: skryptu/modelu :: mta
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Zasoby do MTA » SZUKAM SKRYPTU/MODELU - MTA Odpowiedz do tematu

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