PHP:
function onSay(cid, words, param, channel)
local effect = 10
local etime = 25200
local estorage = 1429
local reqLv=27
local tps = {{x=96, y=96, z=9},{x=96, y=94, z=9} ,{x=84, y=98, z=9} }
local needPremium = false -- true - potrzebny pacc, false - niepotrzebny
local needStorage = 1429 --Mozna ustawic potrzebne storage
local response = {
"Your level is too low.",
"You can't do this.",
"You need premium.",
"You must wait 7 hours."
}
if checkReq(cid)==0 then
doTeleportThing(cid, tps[math.random(1, #tps)])
doSendMagicEffect(getPlayerPosition(cid), efekt)
exhaustion.make(cid, estorage,etime)
return true
else
doPlayerSendTextMessage(cid, 22, response[checkReq(cid)])
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return false
end
end
local function checkReq(cid)
if getPlayerLevel(cid) <reqLv then
return 1
elseif needStorage>0 and getPlayerStorage(cid, needStorage) <= 0 then
return 2
elseif needPremium and isPremium(cid) then
return 3
elseif exhaustion.get(cid, estorage) > 0 then
return 4
end
return 0
end
taki mi wychodzi b??d po wpisani tego (w konfigu)
attempt to call global "checkReq"
a nil value
17 linijka
chcia?em w tamtym pytaniu dopisa? ale skoro mod zamkn?, to tematy sie namno?? =,=