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

Wysłany: 2014-10-18, 22:18


monio







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

Piwa: 3565

Respekt: 120,5
Respekt: 120,5

Witajcie. Mam problem dotycz?cy sklepu z broni? :(



addEvent ("Kastet"true)
addEventHandler ("Kastet"root,
function (celcenathePlayer)
konto getPlayerAccount (cel)
local kasa getPlayerMoney(cel)
if getAccountData (konto"TYP1"then
giveWeapon(cel1)
if kasa >= cena then
takePlayerMoney(celcena)
else
exports.informacje:pokazInfo (thePlayer"info""Nie stac Cie!!")
end
end
end
)



chcia?bym doda? jeszcze jedno "else" poto aby sprawdza?o czy mam licencje na typ1 czy nie i nwm jak to zrobi? zabardzo

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-18, 22:21


markob0







Wiek: 27
Na forum: 4247 dni
Posty: 151
Nick w MP: Markob

Piwa: 939

Respekt: 98,2

Spr?b?j tak...

addEvent ("Kastet"true)
addEventHandler ("Kastet"root,
function (celcenathePlayer)
konto getPlayerAccount (cel)
local kasa getPlayerMoney(cel)
if getAccountData (konto"TYP1"then
else
giveWeapon(cel1)
if kasa >= cena then
takePlayerMoney(celcena)
else
exports.informacje:pokazInfo (thePlayer"info""Nie stac Cie!!")
end
end
end
)


Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-18, 22:29


monio







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

Piwa: 3565

Respekt: 120,5
Respekt: 120,5

no chyba nie :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-18, 22:53


Tostuch







Wiek: 27
Na forum: 4931 dni
Posty: 483
Nick w MP: Tost

Piwa: 137

Respekt: 110
Respekt: 110


addEvent ("Kastet"true)
addEventHandler ("Kastet"root,
function (celcenathePlayer)
konto getPlayerAccount (cel)
local kasa getPlayerMoney(cel)
if getAccountData (konto"TYP1") == true then
giveWeapon(cel1)
if kasa >= cena then
takePlayerMoney(celcena)
else
exports.informacje:pokazInfo (thePlayer"info""Nie stac Cie!!")
end
else
-- tw?j kod
end
end
)
Tak dla wyja?nienia, skrypt si? wykona nawet gdy gracz ma false, bo nie poda?e? co ma zwr?ci?, zawsze warto to doda? i mie? pewno?? :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-18, 23:00


monio







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

Piwa: 3565

Respekt: 120,5
Respekt: 120,5

chodzi mi oto i? mam juz kod:


addEvent ("Kastet"true)
addEventHandler ("Kastet"root,
function (celcenathePlayer)
konto getPlayerAccount (cel)
local kasa getPlayerMoney(cel)
if getAccountData (konto"TYP1"then
giveWeapon(cel1)
if kasa >= cena then
takePlayerMoney(celcena)


ale chce aby dawa?o komenta ze nie mam licencji i komnta ?e nie mam kasy :(

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-18, 23:40


markob0







Wiek: 27
Na forum: 4247 dni
Posty: 151
Nick w MP: Markob

Piwa: 939

Respekt: 98,2

monio, widz? ?e masz ju?...
 
if kasa >= cena then


to chyba brakuje tylko funkcji
 outputChatBox 


Podpis
Postaw piwo autorowi tego posta
 

 
Tagi: setelementdata :: and :: else
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 and else 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