Wysłany: 2014-10-18, 22:18
monio
Wiek: 30 Na forum: 4887 dni Posty: 319
Nick w MP: Monio99
Piwa : 3565
Witajcie. Mam problem dotycz?cy sklepu z broni?
addEvent ( "Kastet" , true )
addEventHandler ( "Kastet" , root ,
function ( cel , cena , thePlayer )
konto = getPlayerAccount ( cel )
local kasa = getPlayerMoney ( cel )
if getAccountData ( konto , "TYP1" ) then
giveWeapon ( cel , 1 )
if kasa >= cena then
takePlayerMoney ( cel , cena )
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
Wysłany: 2014-10-18, 22:21
markob0
Wiek: 27 Na forum: 4247 dni Posty: 151
Nick w MP: Markob
Piwa : 939
Spr?b?j tak...
addEvent ( "Kastet" , true )
addEventHandler ( "Kastet" , root ,
function ( cel , cena , thePlayer )
konto = getPlayerAccount ( cel )
local kasa = getPlayerMoney ( cel )
if getAccountData ( konto , "TYP1" ) then
else
giveWeapon ( cel , 1 )
if kasa >= cena then
takePlayerMoney ( cel , cena )
else
exports . informacje : pokazInfo ( thePlayer , "info" , "Nie stac Cie!!" )
end
end
end
)
Wysłany: 2014-10-18, 22:29
monio
Wiek: 30 Na forum: 4887 dni Posty: 319
Nick w MP: Monio99
Piwa : 3565
no chyba nie
Wysłany: 2014-10-18, 22:53
Tostuch
Wiek: 27 Na forum: 4931 dni Posty: 483
Nick w MP: Tost
Piwa : 137
addEvent ( "Kastet" , true )
addEventHandler ( "Kastet" , root ,
function ( cel , cena , thePlayer )
konto = getPlayerAccount ( cel )
local kasa = getPlayerMoney ( cel )
if getAccountData ( konto , "TYP1" ) == true then
giveWeapon ( cel , 1 )
if kasa >= cena then
takePlayerMoney ( cel , cena )
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??
Wysłany: 2014-10-18, 23:00
monio
Wiek: 30 Na forum: 4887 dni Posty: 319
Nick w MP: Monio99
Piwa : 3565
chodzi mi oto i? mam juz kod:
addEvent ( "Kastet" , true )
addEventHandler ( "Kastet" , root ,
function ( cel , cena , thePlayer )
konto = getPlayerAccount ( cel )
local kasa = getPlayerMoney ( cel )
if getAccountData ( konto , "TYP1" ) then
giveWeapon ( cel , 1 )
if kasa >= cena then
takePlayerMoney ( cel , cena )
ale chce aby dawa?o komenta ze nie mam licencji i komnta ?e nie mam kasy
Wysłany: 2014-10-18, 23:40
markob0
Wiek: 27 Na forum: 4247 dni Posty: 151
Nick w MP: Markob
Piwa : 939
monio , widz? ?e masz ju?...
to chyba brakuje tylko funkcji
Tagi: setelementdata :: and :: else
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: