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

Wysłany: 2016-01-12, 18:59


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4330 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Witam tak jakby nie triggerowa?o, ale mysle ze to nie to

c-side:
addEvent("onplayerlogin",true)
local screenWscreenH guiGetScreenSize()

ls guiCreateLabel(0.030.050.180.05"Los Santos"true)

pc guiCreateLabel(0.030.130.180.05"Palomino Creek"true)

lv guiCreateLabel(0.030.210.180.05"Las Venturas"true)

guiSetFont(ls"default-bold-small")
guiLabelSetHorizontalAlign(ls"center"false)
guiLabelSetVerticalAlign(ls"center")
guiSetFont(pc"default-bold-small")
guiLabelSetHorizontalAlign(pc"center"false)
guiLabelSetVerticalAlign(pc"center")
guiSetFont(lv"default-bold-small")
guiLabelSetHorizontalAlign(lv"center"false)
guiLabelSetVerticalAlign(lv"center"guiSetVisible(ls,false)
guiSetVisible(pc,false)
guiSetVisible(lv,false)

function panelek ()
dxDrawRectangle(screenW 0.0297screenH 0.0481screenW 0.1750screenH 0.0519tocolor(868686255), false)
dxDrawRectangle(screenW 0.0297screenH 0.1296screenW 0.1750screenH 0.0519tocolor(868686255), false)
dxDrawRectangle(screenW 0.0297screenH 0.2148screenW 0.1750screenH 0.0519tocolor(868686255), false)
end


addEventHandler("onplayerlogin",root,function()
addEventHandler ("onClientRender"getRootElement(), panelek)
guiSetVisible(ls,true)
guiSetVisible(pc,true)
guiSetVisible(lv,true)
showCursor(true,false)
showChat(false)
end)


function lsspawn ()
triggerServerEvent("spawnls",getRootElement(),localPlayer)
guiSetVisible(ls,false)
guiSetVisible(pc,false)
guiSetVisible(lv,false)
showCursor(false,false)
showChat(false)
removeEventHandler ("onClientRender"getRootElement(), panelek)
end
addEventHandler("onClientGUIClick",ls,lsspawn,false)


s-side

addEventHandler("onPlayerLogin",getRootElement(),function(player)
triggerClientEvent(player,"onplayerlogin",root)
end)

addEvent("spawnls",true)

addEventHandler("spawnls",root,function(player)
local playerSkin getAccountData (theCurrentAccount"funmodev2-skin")
setCameraTarget (sourcesource)
fadeCamera(sourcetrue15spawnPlayer(source,1478.13,-1705.23,14.05,0,playerSkin)
end)


[ Dodano: 2016-01-12, 19:06 ]
DB BRAK

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-12, 19:16


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

BlackTen,
triggerServerEvent("spawnls",localPlayer,localPlayer)


[ Dodano: 2016-01-12, 19:17 ]
Mo?e by? b?ad tutaj:
addEventHandler("spawnls",root,function(player)
local playerSkin getAccountData (theCurrentAccount"funmodev2-skin")
setCameraTarget (sourcesource)
fadeCamera(sourcetrue15spawnPlayer(source,1478.13,-1705.23,14.05,0,playerSkin)
end)
Dok?adnie to theCurrentAccount

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-12, 19:26


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4330 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Dalej nic :(
2 linijka s-side expand element at arg. 1

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-12, 19:29


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

addEventHandler("onPlayerLogin",getRootElement(),
function()
triggerClientEvent(source,"onplayerlogin",source)
end)


Zobacz na funkcje onPlayerLogin na wiki:

Więcej informacji znajdziesz w Wikipedii MTA:

onPlayerLogin


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-12, 19:30


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4330 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Ten sam b??d :(

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-12, 19:31


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

BlackTen, podaj linijk? tego b??du.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-12, 19:35


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4330 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157



Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-12, 19:42


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

BlackTen, pokaz kod server.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-12, 19:48


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4330 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

addEventHandler("onPlayerLogin",getRootElement(),
function()
triggerClientEvent(source,"onplayerlogin",source)
end)
addEvent("spawnls",true)

addEventHandler("spawnls",root,function(theCurrentAccount)
local playerSkin = getAccountData (theCurrentAccount, "funmodev2-skin")
setCameraTarget (source, source)
fadeCamera(source, true, 15)
spawnPlayer(source,1478.13,-1705.23,14.05,0,playerSkin)
end)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-12, 19:49


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

BlackTen, 2 linijka :
function() 

Zrestartuj skrypt.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-12, 19:52


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4330 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

no bo teraz 3 linijka z tym b??dem !

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-12, 19:59


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

BlackTen, ja mam ten kod i nie ma b??du:
addEventHandler("onPlayerLogin",getRootElement(),
function()
triggerClientEvent(source,"onplayerlogin",source)
end)
addEvent("spawnls",true)

addEventHandler("spawnls",root,function(theCurrentAccount)
local playerSkin getAccountData (theCurrentAccount"funmodev2-skin")
setCameraTarget (sourcesource)
fadeCamera(sourcetrue15)
spawnPlayer(source,1478.13,-1705.23,14.05,0,playerSkin)
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-12, 20:27


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4330 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

A ja mam :(

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-12, 20:28


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

BlackTen, wy??cz serwer i w??cz.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-12, 20:41


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4330 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

TEN SAM B??D

Postaw piwo autorowi tego posta
 

 
Tagi: trigger
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