Wysłany: 2014-10-18, 20:00
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:57
Tostuch
Wiek: 27 Na forum: 4931 dni Posty: 483
Nick w MP: Tost
Piwa : 137
Piszesz drugi raz to samo...
Wysłany: 2014-10-19, 12:31
luki123luki123
Place Game
Wiek: 28 Na forum: 5275 dni Posty: 1948
Nick w MP: LuKiO
Piwa : 6101
monio , addEvent ( "Kastet" , true )
addEventHandler ( "Kastet" , root ,
function ( cel , cena , thePlayer )
konto = getPlayerAccount ( cel )
local kasa = getPlayerMoney ( cel )
if getAccountData ( konto , "TYP1" ) == true then
if kasa >= cena then
giveWeapon ( cel , 1 )
takePlayerMoney ( cel , cena )
else
exports . informacje : pokazInfo ( thePlayer , "info" , "Nie stac Cie!!" )
end
end
end
)
Wysłany: 2014-10-19, 13:05
monio
Wiek: 30 Na forum: 4887 dni Posty: 319
Nick w MP: Monio99
Piwa : 3565
tyle to sam zrobi?em tylko chce doda? jeszcze opcje Else outputChatbox ("Nie posiadasz licencji ")
a jak todaje kolejnego else to wywala mi b??d oto mi chodzi
Wysłany: 2014-10-19, 15:11
luki123luki123
Place Game
Wiek: 28 Na forum: 5275 dni Posty: 1948
Nick w MP: LuKiO
Piwa : 6101
monio , trudne ?
addEvent ( "Kastet" , true )
addEventHandler ( "Kastet" , root ,
function ( cel , cena , thePlayer )
konto = getPlayerAccount ( cel )
local kasa = getPlayerMoney ( cel )
if getAccountData ( konto , "TYP1" ) == true then
if kasa >= cena then
giveWeapon ( cel , 1 )
takePlayerMoney ( cel , cena )
else
exports . informacje : pokazInfo ( thePlayer , "info" , "Nie stac Cie!!" )
end
else
exports . informacje : pokazInfo ( thePlayer , "info" , "Nie posiadasz linceji!!" )
end
end
)
zamiast == true daj to co zapiszujesz w tym Data np. Tak, Nie
Tagi: monio
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: