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, 21:14


monio







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

Piwa: 3565

Respekt: 120,5
Respekt: 120,5

Siema mordeczki mam do was tak? sprawe pisze skrypt na ?owienie ryb i mam taki pytanie jak zrobi? ?e jak kupuje w?dk? to zeby ona by?a np n a 10x urzy?

my?la?em ?e to jako? tak:


setElementData (source"Wedka"true) > 10


nie jestem pewny

Postaw piwo autorowi tego posta
 

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


Artysta

Lua, Lua, Czekolada






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

Piwa: 1427

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

Ehh, prosze

local ile 10
setAccountData playeraccount"Wedka"tonumber(ile))


Je?li gracz ma np 10 razy date w?dka to.
Kod sprawdza czy ma x1 je?li ma to odejmuje jedn?.

  local playeraccount getPlayerAccount thePlayer )        
if getAccountData playeraccount"Wedka" ) >= 1 then    
ilosc getAccountData playeraccount"Wedka" )
local jedna 1
setAccountData playeraccount"Wedka"tonumber(ilosc)-tonumber(jedna) )


Podpis
Something is coming..
Ostatnio zmieniony przez Artysta 2014-04-08, 21:58, w całości zmieniany 2 razy  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-04-08, 21:56


zabijaka2000







Wiek: 26
Na forum: 4983 dni
Posty: 147
Nick w MP: aleks556

Piwa: 13

Respekt: 80

Ostrzeżeń: 20%
Spr?buj przy kupnie ustawia?
setElementData (source"Wedka"10)

i przy u?yciu odejmowa? warto??.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-04-08, 21:59


monio







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

Piwa: 3565

Respekt: 120,5
Respekt: 120,5

a mo?na to na setElementData a nie na setAccountData ?

Postaw piwo autorowi tego posta
 

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


Piorun







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

Piwa: 516

Respekt: 480,7
Respekt: 480,7

Tak, mo?na.

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

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


monio







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

Piwa: 3565

Respekt: 120,5
Respekt: 120,5

zrobi?em tak ale ?le

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


addEvent ("SprWedka"true)
addEventHandler ("SprWedka"root,
function (cel)
if getElementData (cel"Wedeczka") == true then 
else
outputChatBox ("*Niestety nie posiadasz wedki ;(. Kup ja w sklepie wedkarskim;).",25500cel)
end
end
)



Postaw piwo autorowi tego posta
 

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


Artysta

Lua, Lua, Czekolada






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

Piwa: 1427

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

Sprawd? tak


local ile 10
setElementData (source"Wedka"tonumber(ile))

 




if getElementData source"Wedka" ) >= 1 then    
ilosc getElementData source"Wedka" )
local jedna 1
getElementData source"Wedka"tonumber(ilosc)-tonumber(jedna) )


Podpis
Something is coming..
Postaw piwo autorowi tego posta
 

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


monio







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

Piwa: 3565

Respekt: 120,5
Respekt: 120,5

b??d z t? linijk? if getElementData ( source, "Wedka" ) >= 1 then

Postaw piwo autorowi tego posta
 

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


Artysta

Lua, Lua, Czekolada






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

Piwa: 1427

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

Poka? ca?y kod

Podpis
Something is coming..
Postaw piwo autorowi tego posta
 

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


monio







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

Piwa: 3565

Respekt: 120,5
Respekt: 120,5


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


addEvent ("SprWedka"true)
addEventHandler ("SprWedka"root,
function (cel)
if getElementData cel"Wedka" ) >= 1 then 
ilosc getElementData cel"Wedka" )
local jedna 1
getElementData cel"Wedka"tonumber(ilosc)-tonumber(jedna) )
else
outputChatBox ("*Niestety nie posiadasz wedki ;(. Kup ja w sklepie wedkarskim;).",25500cel)
end
end
)


Postaw piwo autorowi tego posta
 

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


Artysta

Lua, Lua, Czekolada






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

Piwa: 1427

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

Powiedz mi jaki b??d w db.

Podpis
Something is coming..
Postaw piwo autorowi tego posta
 

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


monio







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

Piwa: 3565

Respekt: 120,5
Respekt: 120,5

attempt to compare number with bolean a linijka ta:

if getElementData cel"Wedka" ) >= 1 then 


Postaw piwo autorowi tego posta
 

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


Artysta

Lua, Lua, Czekolada






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

Piwa: 1427

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

Oj liter?wk? strzeli?em :)
Sprawd? tak :)

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

addEvent ("SprWedka"true)
addEventHandler ("SprWedka"root,
function (cel)
if getElementData cel"Wedka" ) >= 1 then 
ilosc getElementData cel"Wedka" )
local jedna 1
setElementData cel"Wedka"tonumber(ilosc)-tonumber(jedna) )
end
end
)


Podpis
Something is coming..
Postaw piwo autorowi tego posta
 

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


monio







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

Piwa: 3565

Respekt: 120,5
Respekt: 120,5

ale i tak z t? linijk? jest b??d :/

Postaw piwo autorowi tego posta
 

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


Artysta

Lua, Lua, Czekolada






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

Piwa: 1427

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

Podaj clienta :)

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