Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2017-02-21, 13:08


STOPseba

Emeryt na scenie MTA






Wiek: 25
Na forum: 3771 dni
Posty: 448
Nick w MP: STOPseba

Piwa: 5014

Respekt: 576,3
Respekt: 576,3

Witam
mam problem z kupnem premium z pys uzupe?ni?em wszystko i nie dzia?a...


C:
local data={ showed=nilbutton={}}


local screenWscreenH guiGetScreenSize()
local sxsy guiGetScreenSize()
function isMouseIn(psx,psy,pssx,pssy,abx,aby)
    if not isCursorShowing() then return end
    cx,cy=getCursorPosition()
    cx,cy=cx*sx,cy*sy
    if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then
        return true,cx,cy
    else
        return false
    end
end



function renderZoneBox()
        showCursor(true)
        dxDrawRectangle(screenW 0.3857screenH 0.2781screenW 0.2369screenH 0.4524tocolor(900121), false)
        dxDrawRectangle(screenW *0.3857screenH *0.2781screenW 0.0052screenH 0.4524tocolor(49237254179), false)
        dxDrawText("Premium"screenW 0.4619screenH 0.2905screenW 0.5500screenH 0.3343tocolor(255255255255), 2.00"default""center""top"falsefalsefalsefalsefalse)

        dxDrawText("Numer: 7136 Kod: AA.SP"screenW 0.4161screenH 0.3905screenW 0.5976screenH 0.6657tocolor(255255255255), 1.00"default""center""top"falsefalsefalsefalsefalse)
        dxDrawLine((screenW 0.4179) - 1, (screenH 0.6752) - 1, (screenW 0.4179) - 1screenH 0.7210tocolor(49237254179), 1false)
        dxDrawLine(screenW 0.5857, (screenH 0.6752) - 1, (screenW 0.4179) - 1, (screenH 0.6752) - 1tocolor(49237254179), 1false)
        dxDrawLine((screenW 0.4179) - 1screenH 0.7210screenW 0.5857screenH 0.7210tocolor(49237254179), 1false)
        dxDrawLine(screenW 0.5857screenH 0.7210screenW 0.5857, (screenH 0.6752) - 1tocolor(49237254179), 1false)
        dxDrawRectangle(screenW 0.4179screenH 0.6752screenW 0.1679screenH 0.0457tocolor(00098), false)
        dxDrawText("Sprawdz"screenW 0.4561screenH 0.6818screenW 0.5452screenH 0.7048tocolor(255255255255), 1.00"bankgothic""left""top"falsefalsefalsefalsefalse)
end

addEventHandler("onClientClick"root, function(btn,state)
    if btn=="left" and state=="down" then
        if isMouseIn(screenW 0.4601screenH 0.6848screenW 0.5452screenH 0.7048) and data.showed then
    --    outputChatBox("Ten kod ("..guiGetText(data.button[1])..") wyslij na pm do Czeko (/pm Czeko "..guiGetText(data.button[1])..")")
        if guiCheckBoxGetSelected(data.button[2]) then amount "1" else amount "9" end
        triggerServerEvent("premiumActive"localPlayerguiGetText(data.button[1]),amount)
        destroyElement(data.button[1])
        destroyElement(data.button[2])
        removeEventHandler("onClientRender"rootrenderZoneBox)
        data.showed=false
        showCursor(false)
        elseif isMouseIn(screenW 0.3655screenH 0.2733screenW 0.2696screenH 0.0467) and data.showed then
        destroyElement(data.button[1])
        destroyElement(data.button[2])
        removeEventHandler("onClientRender"rootrenderZoneBox)
        data.showed=false
        showCursor(false)
        end
    end
end)

function premiumshow()
if data.showed then
    destroyElement(data.button[1])
    destroyElement(data.button[2])
    removeEventHandler("onClientRender"rootrenderZoneBox)
    data.showed=false
    showCursor(false)
else
    addEventHandler("onClientRender"rootrenderZoneBox) 
    data.button[1] = guiCreateEdit(0.400.570.210.05""true)
    --data.button[2] = guiCreateCheckBox(0.400.610.210.05"D?u?sze premium (60 dni)"false,true)
    guiEditSetMaxLength(data.button[1], 8)  
    data.showed=true
end
end
addCommandHandler('premium'premiumshow)


S:
--[[
 Code write by YolosPermissions to use only by agree from Yolos.
]]
api="7c173edb493380fc126bf146b"
function getPremiumDate(plr)
    local queryA=exports['ogrpg-db']:dbGet("SELECT * FROM ogrpg_users WHERE id=? AND premiumdate>NOW() LIMIT 1"getElementData(plr,"player:uid"))
    if (queryA and #queryA > 0) then
        return queryA[1].premiumdate
    end
    return false    
end


function setPremiumDay(plr,days)
    if getPremiumDate(plrthen
    local queryA=exports['ogrpg-db']:dbSet(string.format("UPDATE ogrpg_users SET premiumdate = DATE(premiumdate) + INTERVAL %d DAY WHERE id=%d",days,getElementData(plr,"player:uid")))
    return end
    local queryA=exports['ogrpg-db']:dbSet(string.format("UPDATE ogrpg_users SET premiumdate = DATE(curdate()) + INTERVAL %d DAY WHERE id=%d",days,getElementData(plr,"player:uid")))                             api1="7c173edb493380fc126bf146b"
end

addEvent("premiumActive"true)
addEventHandler("premiumActive"root, function(code,amount)
    outputDebugString("Premium>> Konto premium zakupil "..getPlayerName(client).." zakupi?(a) konto premium:"..code..":"..amount)
    local query=string.format("https://admin.serverproject.eu/api/smsapi.php?key="..api1.."&amount=%s&code=%s&desc=%s"tostring(amount),code,string.format("UID:"..getElementData(client,"player:uid")))
    fetchRemotequeryresult,"",falseclient,amount)
end)

function result(responseDataerrnoplayerToReceive,amount)
    if errno == 0 then
    if string.find(responseData,"ok"then
        if tonumber(amount) == 10 then amount 20 end
        setPremiumDay(playerToReceive,amount)
        outputChatBox("* Zakupiono konto premium na "..amount.." dni!"playerToReceive)
    --`    setElementData(playerToReceive,"player:premium", true)
        triggerEvent("save:player",root,playerToReceive)
        triggerEvent("load:player",root,playerToReceive)
    else
        outputChatBox("* B??dny Kod ("..responseData..")", playerToReceive)
--        outputChatBox("*B??dny Kod", client)
    end
    end
end



addCommandHandler("qkx.vip",function(plr,cmd,cel,dni) 
    if exports['pystories-admin']:getAdmin(plr,4) then
    if not cel then outputChatBox("/qkx.vip [gracz] [dni]",plr) return end
    if not dni then outputChatBox("/qkx.vip [gracz] [dni]",plr) return end
    if not tonumber(dni) then outputChatBox("/qkx.vip [gracz] [dni]",plr) return end
        local target=exports["pystories-core"]:findPlayer(plr,cel)
        if not target then
            outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
            return
        end
        setPremiumDay(target,dni)
        outputChatBox("* Nadano konto premium na "..dni.." dni !", plr)
        outputChatBox("* Otrzyma?e?(a?) konto premium na "..dni.." dni !", target)
        triggerEvent("save:player",root,target)
        triggerEvent("load:player",root,target)
        setElementData(target,"player:premium",true)
    end
end)


addCommandHandler("qkx.rozdajpremke",function(plr)
    if getElementData(plr,"player:uid") == 1 then
    for k,v in ipairs(getElementsByType ( "player" )) do
    if not getElementData(v, "player:uid") then return end
        iledni=2
        setPremiumDay(v,iledni)
        triggerEvent("save:player",root,v)
        triggerEvent("load:player",root,v)
        setElementData(v,"player:premium",true)
                gracze=v
                end
    end
    --outputChatBox("Z powodu dobrego humoru Butlipana, ca?y serwer otrzyma? premium na "..iledni.." dni!", gracze, 255, 255, 255)
end)

addCommandHandler("qkx.rozdajpremke",function(plr)
if getElementData(plr,"player:uid") == 1 then
outputChatBox("* Ca?y serwer otrzymuje konto premium na 1 dni !", root, 0, 192, 255)
end
end)

je?li si? na tym znasz napisz a na pewno dam respekt oraz piwo

API:
Kod:

7c173edb493380fc126bf146b

Adres URL:
Kod:

https://admin.serverproject.eu/api/smsapi.php?key=7c173edb493380fc126bf146b&amount=$KWOTA&code=$KOD_SMS&desc=$OPIS


B??d:


Podpis



Kontakt
Discord: STOPseba#7603
STOPseba na fejsie
Messenger


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-02-21, 14:00


_Haze

Peace Yo!






Wiek: 24
Na forum: 4184 dni
Posty: 1648
Nick w MP: Haze

Piwa: 2628

Respekt: 1020
Respekt: 1020

STOPseba,
api1 "7c173edb493380fc126bf146b"
function getPremiumDate(plr)
    local queryA=exports['ogrpg-db']:dbGet("SELECT * FROM ogrpg_users WHERE id=? AND premiumdate>NOW() LIMIT 1"getElementData(plr,"player:uid"))
    if (queryA and #queryA > 0) then
        return queryA[1].premiumdate
    end
    return false    
end


function setPremiumDay(plr,days)
    if getPremiumDate(plrthen
    local queryA=exports['ogrpg-db']:dbSet(string.format("UPDATE ogrpg_users SET premiumdate = DATE(premiumdate) + INTERVAL %d DAY WHERE id=%d",days,getElementData(plr,"player:uid")))
    return end
    local queryA=exports['ogrpg-db']:dbSet(string.format("UPDATE ogrpg_users SET premiumdate = DATE(curdate()) + INTERVAL %d DAY WHERE id=%d",days,getElementData(plr,"player:uid")))                             api1="7c173edb493380fc126bf146b"
end

addEvent("premiumActive"true)
addEventHandler("premiumActive"root, function(code,amount)
    outputDebugString("Premium>> Konto premium zakupil "..getPlayerName(client).." zakupi?(a) konto premium:"..code..":"..amount)
    local query=string.format("https://admin.serverproject.eu/api/smsapi.php?key="..api1.."&amount=%s&code=%s&desc=%s"tostring(amount),code,string.format("UID:"..getElementData(client,"player:uid")))
    fetchRemotequeryresult,"",falseclient,amount)
end)

function result(responseDataerrnoplayerToReceive,amount)
    if errno == 0 then
    if string.find(responseData,"ok"then
        if tonumber(amount) == 10 then amount 20 end
        setPremiumDay(playerToReceive,amount)
        outputChatBox("* Zakupiono konto premium na "..amount.." dni!"playerToReceive)
    --`    setElementData(playerToReceive,"player:premium", true)
        triggerEvent("save:player",root,playerToReceive)
        triggerEvent("load:player",root,playerToReceive)
    else
        outputChatBox("* B??dny Kod ("..responseData..")", playerToReceive)
--        outputChatBox("*B??dny Kod", client)
    end
    end
end



addCommandHandler("qkx.vip",function(plr,cmd,cel,dni) 
    if exports['pystories-admin']:getAdmin(plr,4) then
    if not cel then outputChatBox("/qkx.vip [gracz] [dni]",plr) return end
    if not dni then outputChatBox("/qkx.vip [gracz] [dni]",plr) return end
    if not tonumber(dni) then outputChatBox("/qkx.vip [gracz] [dni]",plr) return end
        local target=exports["pystories-core"]:findPlayer(plr,cel)
        if not target then
            outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
            return
        end
        setPremiumDay(target,dni)
        outputChatBox("* Nadano konto premium na "..dni.." dni !", plr)
        outputChatBox("* Otrzyma?e?(a?) konto premium na "..dni.." dni !", target)
        triggerEvent("save:player",root,target)
        triggerEvent("load:player",root,target)
        setElementData(target,"player:premium",true)
    end
end)


addCommandHandler("qkx.rozdajpremke",function(plr)
    if getElementData(plr,"player:uid") == 1 then
    for k,v in ipairs(getElementsByType ( "player" )) do
    if not getElementData(v, "player:uid") then return end
        iledni=2
        setPremiumDay(v,iledni)
        triggerEvent("save:player",root,v)
        triggerEvent("load:player",root,v)
        setElementData(v,"player:premium",true)
                gracze=v
                end
    end
    --outputChatBox("Z powodu dobrego humoru Butlipana, ca?y serwer otrzyma? premium na "..iledni.." dni!", gracze, 255, 255, 255)
end)

addCommandHandler("qkx.rozdajpremke",function(plr)
if getElementData(plr,"player:uid") == 1 then
outputChatBox("* Ca?y serwer otrzymuje konto premium na 1 dni !", root, 0, 192, 255)
end
end)


Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
STOPseba
Wysłany: 2017-02-21, 14:20


STOPseba

Emeryt na scenie MTA






Wiek: 25
Na forum: 3771 dni
Posty: 448
Nick w MP: STOPseba

Piwa: 5014

Respekt: 576,3
Respekt: 576,3

"HazeMaFaze" napisał/a:

STOPseba,
api1 "7c173edb493380fc126bf146b"
function getPremiumDate(plr)
    local queryA=exports['ogrpg-db']:dbGet("SELECT * FROM ogrpg_users WHERE id=? AND premiumdate>NOW() LIMIT 1"getElementData(plr,"player:uid"))
    if (queryA and #queryA > 0) then
        return queryA[1].premiumdate
    end
    return false    
end


function setPremiumDay(plr,days)
    if getPremiumDate(plrthen
    local queryA=exports['ogrpg-db']:dbSet(string.format("UPDATE ogrpg_users SET premiumdate = DATE(premiumdate) + INTERVAL %d DAY WHERE id=%d",days,getElementData(plr,"player:uid")))
    return end
    local queryA=exports['ogrpg-db']:dbSet(string.format("UPDATE ogrpg_users SET premiumdate = DATE(curdate()) + INTERVAL %d DAY WHERE id=%d",days,getElementData(plr,"player:uid")))                             api1="7c173edb493380fc126bf146b"
end

addEvent("premiumActive"true)
addEventHandler("premiumActive"root, function(code,amount)
    outputDebugString("Premium>> Konto premium zakupil "..getPlayerName(client).." zakupi?(a) konto premium:"..code..":"..amount)
    local query=string.format("https://admin.serverproject.eu/api/smsapi.php?key="..api1.."&amount=%s&code=%s&desc=%s"tostring(amount),code,string.format("UID:"..getElementData(client,"player:uid")))
    fetchRemotequeryresult,"",falseclient,amount)
end)

function result(responseDataerrnoplayerToReceive,amount)
    if errno == 0 then
    if string.find(responseData,"ok"then
        if tonumber(amount) == 10 then amount 20 end
        setPremiumDay(playerToReceive,amount)
        outputChatBox("* Zakupiono konto premium na "..amount.." dni!"playerToReceive)
    --`    setElementData(playerToReceive,"player:premium", true)
        triggerEvent("save:player",root,playerToReceive)
        triggerEvent("load:player",root,playerToReceive)
    else
        outputChatBox("* B??dny Kod ("..responseData..")", playerToReceive)
--        outputChatBox("*B??dny Kod", client)
    end
    end
end



addCommandHandler("qkx.vip",function(plr,cmd,cel,dni) 
    if exports['pystories-admin']:getAdmin(plr,4) then
    if not cel then outputChatBox("/qkx.vip [gracz] [dni]",plr) return end
    if not dni then outputChatBox("/qkx.vip [gracz] [dni]",plr) return end
    if not tonumber(dni) then outputChatBox("/qkx.vip [gracz] [dni]",plr) return end
        local target=exports["pystories-core"]:findPlayer(plr,cel)
        if not target then
            outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
            return
        end
        setPremiumDay(target,dni)
        outputChatBox("* Nadano konto premium na "..dni.." dni !", plr)
        outputChatBox("* Otrzyma?e?(a?) konto premium na "..dni.." dni !", target)
        triggerEvent("save:player",root,target)
        triggerEvent("load:player",root,target)
        setElementData(target,"player:premium",true)
    end
end)


addCommandHandler("qkx.rozdajpremke",function(plr)
    if getElementData(plr,"player:uid") == 1 then
    for k,v in ipairs(getElementsByType ( "player" )) do
    if not getElementData(v, "player:uid") then return end
        iledni=2
        setPremiumDay(v,iledni)
        triggerEvent("save:player",root,v)
        triggerEvent("load:player",root,v)
        setElementData(v,"player:premium",true)
                gracze=v
                end
    end
    --outputChatBox("Z powodu dobrego humoru Butlipana, ca?y serwer otrzyma? premium na "..iledni.." dni!", gracze, 255, 255, 255)
end)

addCommandHandler("qkx.rozdajpremke",function(plr)
if getElementData(plr,"player:uid") == 1 then
outputChatBox("* Ca?y serwer otrzymuje konto premium na 1 dni !", root, 0, 192, 255)
end
end)

Dalej nie dzia?a :(
b??d:


Podpis



Kontakt
Discord: STOPseba#7603
STOPseba na fejsie
Messenger


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-02-21, 14:27


_Haze

Peace Yo!






Wiek: 24
Na forum: 4184 dni
Posty: 1648
Nick w MP: Haze

Piwa: 2628

Respekt: 1020
Respekt: 1020

STOPseba, poda?e? dobry kod?

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
STOPseba
Wysłany: 2017-02-21, 14:30


STOPseba

Emeryt na scenie MTA






Wiek: 25
Na forum: 3771 dni
Posty: 448
Nick w MP: STOPseba

Piwa: 5014

Respekt: 576,3
Respekt: 576,3

HazeMaFaze, tak

Podpis



Kontakt
Discord: STOPseba#7603
STOPseba na fejsie
Messenger


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-02-21, 14:53


_Haze

Peace Yo!






Wiek: 24
Na forum: 4184 dni
Posty: 1648
Nick w MP: Haze

Piwa: 2628

Respekt: 1020
Respekt: 1020

STOPseba,
addEvent("premiumActive"true)
addEventHandler("premiumActive"root, function(code,amount)
    outputDebugString("Premium>> Konto premium zakupil "..getPlayerName(client).." zakupi?(a) konto premium:"..code..":"..amount)
    local query=string.format("https://admin.serverproject.eu/api/smsapi.php?key="..api1.."&amount=%s&code=%s&desc=%s"tostring(amount),code,string.format("UID:"..getElementData(client,"player:uid")))
    if not query then outputDebugString("Blad 1"end
    if fetchRemotequeryresult,"",falseclient,amountthen else outputDebugString("Blad 1"end
end)

zobacz co sie wyswietli

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
STOPseba
Wysłany: 2017-02-21, 15:03


STOPseba

Emeryt na scenie MTA






Wiek: 25
Na forum: 3771 dni
Posty: 448
Nick w MP: STOPseba

Piwa: 5014

Respekt: 576,3
Respekt: 576,3

HazeMaFaze,
[2017-02-21 15:02WARNING: [TESTY]/Premium/s_pgui.lua:23Access denied 'fetchRemote'

Takie co?

Podpis



Kontakt
Discord: STOPseba#7603
STOPseba na fejsie
Messenger


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-02-21, 15:05


_Haze

Peace Yo!






Wiek: 24
Na forum: 4184 dni
Posty: 1648
Nick w MP: Haze

Piwa: 2628

Respekt: 1020
Respekt: 1020

STOPseba, dodaj skrypt do acl admin

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
STOPseba
Wysłany: 2017-02-21, 15:13


STOPseba

Emeryt na scenie MTA






Wiek: 25
Na forum: 3771 dni
Posty: 448
Nick w MP: STOPseba

Piwa: 5014

Respekt: 576,3
Respekt: 576,3

HazeMaFaze, doda?em i teraz w grze mam takie co?
Kod:


* B??dny Kod ({"status":"fail","error":"bad_code"})

i teraz rodzi si? pytanie czy wszystko dobrze zrobi?em :(

Podpis



Kontakt
Discord: STOPseba#7603
STOPseba na fejsie
Messenger


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-02-21, 15:21


_Haze

Peace Yo!






Wiek: 24
Na forum: 4184 dni
Posty: 1648
Nick w MP: Haze

Piwa: 2628

Respekt: 1020
Respekt: 1020

STOPseba, skrypt dzia?a poprawnie to ty poda?e? zapewne b??dny albo wykorzystany kod

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
STOPseba
Wysłany: 2017-02-21, 15:45


STOPseba

Emeryt na scenie MTA






Wiek: 25
Na forum: 3771 dni
Posty: 448
Nick w MP: STOPseba

Piwa: 5014

Respekt: 576,3
Respekt: 576,3

HazeMaFaze, Zrobi?em tek
S:
api1 "7c173edb493380fc126bf146b"
function getPremiumDate(plr)
    local queryA=exports['ogrpg-db']:dbGet("SELECT * FROM ogrpg_users WHERE id=? AND premiumdate>NOW() LIMIT 1"getElementData(plr,"player:uid"))
    if (queryA and #queryA > 0) then
        return queryA[1].premiumdate
    end
    return false    
end


function setPremiumDay(plr,days)
    if getPremiumDate(plrthen
    local queryA=exports['ogrpg-db']:dbSet(string.format("UPDATE ogrpg_users SET premiumdate = DATE(premiumdate) + INTERVAL %d DAY WHERE id=%d",days,getElementData(plr,"player:uid")))
    return end
    local queryA=exports['ogrpg-db']:dbSet(string.format("UPDATE ogrpg_users SET premiumdate = DATE(curdate()) + INTERVAL %d DAY WHERE id=%d",days,getElementData(plr,"player:uid")))                             api1="7c173edb493380fc126bf146b"
end

addEvent("premiumActive"true)
addEventHandler("premiumActive"root, function(code,amount)
    outputDebugString("Premium>> Konto premium zakupil "..getPlayerName(client).." zakupi?(a) konto premium:"..code..":"..amount)
    local query=string.format("https://admin.serverproject.eu/api/smsapi.php?key="..api1.."&amount=%s&code=%s&desc=%s"tostring(amount),code,string.format("UID:"..getElementData(client,"player:uid")))
    if not query then outputDebugString("Blad 1"end
    if fetchRemotequeryresult,"",falseclient,amountthen else outputDebugString("Blad 1"end
end)

function result(responseDataerrnoplayerToReceive,amount)
    if errno == 0 then
    if string.find(responseData,"ok"then
        if tonumber(amount) == 2 then amount 7 end
        setPremiumDay(playerToReceive,amount)
        outputChatBox("* Zakupiono konto premium na "..amount.." dni!"playerToReceive)
    --`    setElementData(playerToReceive,"player:premium", true)
        triggerEvent("save:player",root,playerToReceive)
        triggerEvent("load:player",root,playerToReceive)
    else
        outputChatBox("* B??dny Kod ("..responseData..")", playerToReceive)
--        outputChatBox("*B??dny Kod", client)
    end
    end
end



addCommandHandler("qkx.vip",function(plr,cmd,cel,dni) 
    if exports['pystories-admin']:getAdmin(plr,4) then
    if not cel then outputChatBox("/qkx.vip [gracz] [dni]",plr) return end
    if not dni then outputChatBox("/qkx.vip [gracz] [dni]",plr) return end
    if not tonumber(dni) then outputChatBox("/qkx.vip [gracz] [dni]",plr) return end
        local target=exports["pystories-core"]:findPlayer(plr,cel)
        if not target then
            outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
            return
        end
        setPremiumDay(target,dni)
        outputChatBox("* Nadano konto premium na "..dni.." dni !", plr)
        outputChatBox("* Otrzyma?e?(a?) konto premium na "..dni.." dni !", target)
        triggerEvent("save:player",root,target)
        triggerEvent("load:player",root,target)
        setElementData(target,"player:premium",true)
    end
end)


addCommandHandler("qkx.rozdajpremke",function(plr)
    if getElementData(plr,"player:uid") == 1 then
    for k,v in ipairs(getElementsByType ( "player" )) do
    if not getElementData(v, "player:uid") then return end
        iledni=2
        setPremiumDay(v,iledni)
        triggerEvent("save:player",root,v)
        triggerEvent("load:player",root,v)
        setElementData(v,"player:premium",true)
                gracze=v
                end
    end
    --outputChatBox("Z powodu dobrego humoru Butlipana, ca?y serwer otrzyma? premium na "..iledni.." dni!", gracze, 255, 255, 255)
end)

addCommandHandler("qkx.rozdajpremke",function(plr)
if getElementData(plr,"player:uid") == 1 then
outputChatBox("* Ca?y serwer otrzymuje konto premium na 1 dni !", root, 0, 192, 255)
end
end)

C:
local data={ showed=nilbutton={}}


local screenWscreenH guiGetScreenSize()
local sxsy guiGetScreenSize()
function isMouseIn(psx,psy,pssx,pssy,abx,aby)
    if not isCursorShowing() then return end
    cx,cy=getCursorPosition()
    cx,cy=cx*sx,cy*sy
    if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then
        return true,cx,cy
    else
        return false
    end
end



function renderZoneBox()
        showCursor(true)
        dxDrawRectangle(screenW 0.3857screenH 0.2781screenW 0.2369screenH 0.4524tocolor(900121), false)
        dxDrawRectangle(screenW *0.3857screenH *0.2781screenW 0.0052screenH 0.4524tocolor(49237254179), false)
        dxDrawText("Premium"screenW 0.4619screenH 0.2905screenW 0.5500screenH 0.3343tocolor(255255255255), 2.00"default""center""top"falsefalsefalsefalsefalse)

        dxDrawText("Numer: 7136 Kod: AA.SP\nTest nie wysy?ac sms!!!!"screenW 0.4161screenH 0.3905screenW 0.5976screenH 0.6657tocolor(255255255255), 1.00"default""center""top"falsefalsefalsefalsefalse)
        dxDrawLine((screenW 0.4179) - 1, (screenH 0.6752) - 1, (screenW 0.4179) - 1screenH 0.7210tocolor(49237254179), 1false)
        dxDrawLine(screenW 0.5857, (screenH 0.6752) - 1, (screenW 0.4179) - 1, (screenH 0.6752) - 1tocolor(49237254179), 1false)
        dxDrawLine((screenW 0.4179) - 1screenH 0.7210screenW 0.5857screenH 0.7210tocolor(49237254179), 1false)
        dxDrawLine(screenW 0.5857screenH 0.7210screenW 0.5857, (screenH 0.6752) - 1tocolor(49237254179), 1false)
        dxDrawRectangle(screenW 0.4179screenH 0.6752screenW 0.1679screenH 0.0457tocolor(00098), false)
        dxDrawText("Sprawdz"screenW 0.4561screenH 0.6818screenW 0.5452screenH 0.7048tocolor(255255255255), 1.00"bankgothic""left""top"falsefalsefalsefalsefalse)
end

addEventHandler("onClientClick"root, function(btn,state)
    if btn=="left" and state=="down" then
        if isMouseIn(screenW 0.4601screenH 0.6848screenW 0.5452screenH 0.7048) and data.showed then
    --    outputChatBox("Ten kod ("..guiGetText(data.button[1])..") wyslij na pm do Czeko (/pm Czeko "..guiGetText(data.button[1])..")")
        if guiCheckBoxGetSelected(data.button[2]) then amount "1" else amount "9" end
        triggerServerEvent("premiumActive"localPlayerguiGetText(data.button[1]),amount)
        destroyElement(data.button[1])
        destroyElement(data.button[2])
        removeEventHandler("onClientRender"rootrenderZoneBox)
        data.showed=false
        showCursor(false)
        elseif isMouseIn(screenW 0.3655screenH 0.2733screenW 0.2696screenH 0.0467) and data.showed then
        destroyElement(data.button[1])
        destroyElement(data.button[2])
        removeEventHandler("onClientRender"rootrenderZoneBox)
        data.showed=false
        showCursor(false)
        end
    end
end)

function premiumshow()
if data.showed then
    destroyElement(data.button[1])
    destroyElement(data.button[2])
    removeEventHandler("onClientRender"rootrenderZoneBox)
    data.showed=false
    showCursor(false)
else
    addEventHandler("onClientRender"rootrenderZoneBox) 
    data.button[1] = guiCreateEdit(0.400.570.210.05""true)
    --data.button[2] = guiCreateCheckBox(0.400.610.210.05"D?u?sze premium (60 dni)"false,true)
    guiEditSetMaxLength(data.button[1], 8)  
    data.showed=true
end
end
addCommandHandler('premium'premiumshow)


jak dobrze zrozumia?em w S musz? da? na iloe dni dostanie premium
if tonumber(amount) == 2 then amount 7 end

a w C musz? da? kwot? netto z hosta
if guiCheckBoxGetSelected(data.button[2]) then amount "1" else amount "9" end



Podpis



Kontakt
Discord: STOPseba#7603
STOPseba na fejsie
Messenger


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-02-21, 19:38


.RiV







Wiek: 25
Na forum: 3587 dni
Posty: 554
Nick w MP: Split

Piwa: 2596

Respekt: 597,8
Respekt: 597,8

Ahh po co korzystacie z API kt?re mo?e zawiera? bugi.

Wykona?em dla ServerProject API kt?re dzia?a i nie posiada bug?w, wi?cej informacji w linku poni?ej:
- https://admin.serverproject.eu/api/sms

Podpis

Autor OGRPG, na scenie MTA od 2012 roku.




Użytkownik: 08.08.2016
GTAO Member: 06.02.2017
Support-Team: 17.06.2017 & 01.06.2019 - 18.11.2019
Moderator: 14.01.2018 - 09.08.2018

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
STOPseba
Wysłany: 2017-02-21, 19:39


Malentas

Koder mirofali w lua






Wiek: 24
Na forum: 3681 dni
Posty: 146
Nick w MP: Malentas

Piwa: 1626

Respekt: 47,3

Kod:

* B??dny Kod ({"status":"fail","error":"bad_code"})


"bad_code" m?wi jasno b??dny kod! Spisz wszystkich informacji masz w zk?adce smsapi na server project, zapoznaj si? z tym.

Kod najprawdopodbniej wykorzysta?e? w tym oto momencie

http://i.imgur.com/iVVB1Rm.png

Podpis
Aktualny projekt:


AntoriaMTA
Discord: https://discord.gg/TVrAddp3Wu

Najszybszy kontakt (discord): Malentas#2091
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
STOPseba
Wysłany: 2017-02-21, 21:59


STOPseba

Emeryt na scenie MTA






Wiek: 25
Na forum: 3771 dni
Posty: 448
Nick w MP: STOPseba

Piwa: 5014

Respekt: 576,3
Respekt: 576,3

.WhiteBlue, napisalem go cb na gg w tej sprawie.
Malentas, to jest nie mo?liwe ze b??dny kod poniewa? wys?a?em nowy i to samo.

Podpis



Kontakt
Discord: STOPseba#7603
STOPseba na fejsie
Messenger


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-02-22, 14:18


mis14







Wiek: 25
Na forum: 3924 dni
Posty: 185

Piwa: 73

Respekt: -149

"STOPseba" napisał/a:

.WhiteBlue, napisalem go cb na gg w tej sprawie.
Malentas, to jest nie mo?liwe ze b??dny kod poniewa? wys?a?em nowy i to samo.
kod jest prosty splita jedynie doda? zapis mysql ale z tym ci nie pomog?

Postaw piwo autorowi tego posta
 

 
Tagi: kupno :: premium
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku