Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: get
1. attempt to get lenght of global 'q' (a boolean value)
Witam, ma kto? pomys? co dok?adnie powinienem zrobi?? B??d wywala na tej linijce: if #q < 1 then
Kod:

q=exports["pystories-db"]:dbSet("select ownerid,koszt,id from lss_domy where id=?", domid)
if #q < 1 then
client:outputChat("Wyst?pi? b??d, nie znaleziono takiego domu!", 255, 0, 0)
return
end
2. Get String Dini
Witam, gdy u?yj? takiego kodu:
Cytat:

if(dini_Exists("HeadAdmin.ini"))
{
if(dini_GetString("HeadAdmin.ini", PlayerName(playerid)))
{
IsPlayerHeadAdmin[playerid] = 1;
}
}


Dostaj? taki b??d:
Cytat:

C:UsersLukiDesktopSerwer PASgamemodespasgm2.pwn(540) : error 033: array must be indexed (variable "dini_GetString")
3. Pieniądze - get,take,givePlayerMoney
Witam, tak jak w temacie. Mam pewien problem i nie umiem go rozwi?za?. Chodzi o to, ?e chcia?bym zamiast "UstawKase" by?o po prostu getPlayerMoney + nawi?zanie do Bazy danych MySQL, "DodajKase", givePlayerMoney, "ZabierzKase" takePlayerMoney, i "PobierzKase"


[lua]
function PobierzKase (player)
local player = player or source
if not player then return end
local UID = getElementData(player, "UID")
if not UID then return end
local ACC = getAccountName(getPlayerAccount(player))
if not ACC then return end

local gh = dbQuery(DB, "SELECT * FROM Ev_Konta WHERE UID=?" , tostring(UID))
local result1 = dbPoll(gh, -1)
dbFree(gh)

if #result1 ~= 0 then
local q1 = dbQuery( DB, "SELECT Kasa FROM Ev_Konta WHERE UID=?" , tostring(UID))
dbFree(q1)
return result1[1]['Kasa']
else
local q2 = dbQuery(DB, "INSERT INTO Ev_Konta SET UID=?, Login=?, Kasa=?, Bank=?", UID, ACC, 0, 0)
dbFree(q2)
return 0
end
end
-----------------------------------------------------------------------------
function DodajKase (player, Wartosc)
local player = player or source
if not player then return end
local UID = getElementData(player, "UID")
if not UID then return end
local ACC = getAccountName(getPlayerAccount(player))
if not ACC then return end
local Bank = 0

if not Wartosc then return end
local Wartosc = tonumber(Wartosc)
if not Wartosc then return end...