What's new

Potrzebuje pomocy z systemem NPC.

Status
Not open for further replies.

Arelies

User
Joined
Mar 28, 2010
Messages
48
Reaction score
4
Witam.
Potrzebuje pomocy ze skrpytem a mianowicie chcialbym ustawic 2 jezyki dla NPC. Bedzie to zalezne od jezyka ktory wybrany zostanie na stronie. A wiec potrzebuje by kod pobieral dane z tabeli accounts.lang powiedzmy 0 dla angielskiego i 1 dla polskiego i porownywal wartosci wtedy dla 0 pokaze instrukcje X a dla 1 pokaze instrukcje Y.

Prosze o pomoc. Milego dnia.

Probowalem napisac to w ten sposob

PHP:
if(db.executeQuery("SELECT lang FROM accounts WHERE id='.. getAccountIdByName(getCreatureName) ..';") = 0) then
Wykonuje sie instrukcja X
else
Wykonuje sie instrukcja Y
end
 

kuba1418

Banned
Joined
Apr 12, 2008
Messages
178
Reaction score
17
Odp: Potrzebuje pomocy z systemem NPC.

PHP:
local query = db.getResult("SELECT `lang` FROM `accounts` WHERE id='.. getAccountIdByName(getCreatureName) ..';")
if query:getID() ~= -1 then
Wykonuje sie instrukcja X
else
Wykonuje sie instrukcja Y
end

Musisz pod koniec doda? jeszcze
PHP:
query:free()
 
Last edited:
Status
Not open for further replies.
Top