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

Wysłany: 2014-04-08, 22:40


monio







Wiek: 30
Na forum: 5028 dni
Posty: 319
Nick w MP: Monio99

Piwa: 3565

Respekt: 120,5
Respekt: 120,5


addEventHandler ("onClientMarkerHit", sklep, 
function (hitElement)
if hitElement == getLocalPlayer() then
triggerServerEvent ("Wedka", root, localPlayer)
end
end)

?apaj

[ Dodano: 2014-04-08, 22:41 ]
i to

addEventHandler ("onClientMarkerHit", root, 
function (hitElement)
if hitElement == getLocalPlayer() then
triggerServerEvent ("SprWedka", root, getLocalPlayer() )
if getElementData (source, "Miejsce") == true then 
local rand = math.random(1, #ryby)
local kasa = math.random(1, #koszt)
outputChatBox ("**Zlowiles "..ryby[rand].. " Kt?ry kosztuje: "..koszt[kasa], hitElement)
end
end
end
)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-04-08, 22:55


Artysta

Lua, Lua, Czekolada






Wiek: 28
Na forum: 4607 dni
Posty: 240
Nick w MP: Artysta/Koojot

Piwa: 1427

Respekt: 205,8
Respekt: 205,8Respekt: 205,8

Tu ?ap pliki clienta



addEventHandler ("onClientMarkerHit", sklep, 
function (source)
triggerServerEvent ("Wedka", source )
end)




function costam ()
triggerServerEvent ("SprWedka", source )
if getElementData (source, "Miejsce") == true then 
local rand = math.random(1, #ryby)
local kasa = math.random(1, #koszt)
outputChatBox ("**Zlowiles "..ryby[rand].. " Kt?ry kosztuje: "..koszt[kasa], source)
end
end
end
addEventHandler ("onClientMarkerHit", root, costam)



Tu serwer


function daj ()
if not isPedInVehicle(source) then
local ile = 10
setElementData (source, "Wedeczka", tonumber(ile))
outputChatBox ("Brawo", source)
else
outputChatBox ("Zenada", source)
end
end
addEvent ("Wedka", true)
addEventHandler ("Wedka", root, daj )



function sialalala (source)
if getElementData ( source, "Wedka" ) >= 1 then 
ilosc = getElementData ( source, "Wedka" )
local jedna = 1
setElementData ( source, "Wedka", tonumber(ilosc)-tonumber(jedna) )
outputChatBox ("Jesli widac to dobrze ;)", source)
end
end
addEvent ("SprWedka", true)
addEventHandler ("SprWedka", root, sialalala )


Je?li bd wywala? funkcje "costam" to zamie?
function costam ()

na
function costam (source)


Podpis
Something is coming..
Postaw piwo autorowi tego posta
 

 
Tagi: setelementdata
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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