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

Wysłany: 2018-12-18, 17:30


Samotny

5life.pl






Wiek: 22
Na forum: 3351 dni
Posty: 34
Nick w MP: Jabol

Piwa: 81

Respekt: 20,5

Siemanko, potrzebuje pomocy a natomiast nie wiem jak pod??czy? Panel Premium pod MicroSMS us?ugi mam zaakceptowane ale jak chce testowy kod pokazuje mi, ?e skrypt nie odpowiedzia? czy jako? tak, pomo?e kto? ?

Dam za to + rep

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-12-18, 18:59


Norbert1234

Nie umiem w LUA






Wiek: 22
Na forum: 3987 dni
Posty: 319
Nick w MP: Gusterowskyy

Piwa: 242

Respekt: 60

B??dy jakie?? Kawa?ek skryptu odpowiedzialny za to?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-12-18, 19:12


Samotny

5life.pl






Wiek: 22
Na forum: 3351 dni
Posty: 34
Nick w MP: Jabol

Piwa: 81

Respekt: 20,5

Norbert1234, Chodzi mi o to, ?e pr?buj? podpi?? te Micro SMS tylko zbytnio nie wiem jak i na stronie MicroSMS wy?wietla si?

Niestety jednak wyst?pi?y b??dy, kt?re musisz poprawi?:

• Tw?j skrypt nie zwr?ci? komunikatu "OK"

i nie wiem jak to podpi?? i szukam pomocy w tym aby kto? mi powiedzia? jak to zrobi?. Nie wiem jaka? pomoc na Discordzie cokolwiek :D

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-12-18, 19:26


Nexisten

Moderator






Wiek: 22
Na forum: 4107 dni
Posty: 551
Nick w MP: Nexisten

Piwa: 1479

Respekt: 287,3
Respekt: 287,3Respekt: 287,3Respekt: 287,3

Nikt Ci nie wyczaruje rozwi?zania je?li nie poka?esz skrawka lub ca?ego kodu.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-12-18, 19:38


Samotny

5life.pl






Wiek: 22
Na forum: 3351 dni
Posty: 34
Nick w MP: Jabol

Piwa: 81

Respekt: 20,5

1 KOD


[[
 Code write by YolosPermissions to use only by agree from Yolos.
]]

function RGBToHex(redgreenbluealpha)
    if ( (red or red 255 or green or green 255 or blue or blue 255) or (alpha and (alpha or alpha 255) ) ) then
        return nil
    end
    if ( alpha then
        return string.format("#%.2X%.2X%.2X%.2X"red,green,blue,alpha)
    else
        return string.format("#%.2X%.2X%.2X"red,green,blue)
    end
end
    
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")))
end

addEvent("premiumActive"true)
addEventHandler("premiumActive"root, function(code,amount,number)
    if not code then return end
    outputDebugString(code..":"..amount)
    local x=exports['ogrpg-db']:dbGet("SELECT * from ogrpg_premium_code where code=?",code)
    if and #x > 0 then
        if x[1].active 1 then outputChatBox("*B?‚?™dny -Kod",client) return end
        local xamount tonumber(x[1].amount)
        if xamount == tonumber(amountthen
        exports['ogrpg-db']:dbSet("UPDATE ogrpg_premium_code set active=0,active_date=NOW(),active_uid=? where code=?",getElementData(client,"player:uid"),code)
        -- BRAK PROMOCJI -- if tonumber(amount) == 4354 then amount 15 else amount 30 end
        if tonumber(amount) == 5098 then 
        amount 1
        elseif tonumber(amount) == 5102 then 
        amount 7
        elseif tonumber(amount) == 4364 then 
        amount 30
        elseif tonumber(amount) == 5103 then 
        amount 45
        end
        setPremiumDay(client,amount)
        setElementData(client,"player:premium",true)
        outputChatBox("Kupiono konto premium na "..amount.." dni! Weso?‚ego dnia !"client)
        triggerEvent("load:player",root,client)
        triggerEvent("save:player",root,client)
        else
        outputChatBox("B?‚?™dny ekod",client) return
        end
    return end
    local query=string.format("http://microsms.pl/api/check.php?userid=5381&number=%s&code=%s&serviceid=%s"number,code,amount)
    fetchRemotequeryresult,"",falseclient,amount,number)
end)

function result(responseDataerrnoplayerToReceive,amount)
    if errno == 0 then
  local x split(responseData,",")
    if not x then return end
    if string.find(x[1],"1"then
        --BRAK PRMOCJI -- if tonumber(amount) == 4354 then amount 15 else amount 30 end
        if tonumber(amount) == 5098 then 
        amount 1
        elseif tonumber(amount) == 5102 then 
        amount 7
        elseif tonumber(amount) == 4364 then 
        amount 30
        elseif tonumber(amount) == 5103 then 
        amount 45
        end
        setPremiumDay(playerToReceive,amount)
        outputChatBox("Kupiono konto premium na "..amount.." dni! Weso?‚ego dnia !"playerToReceive)
    --`    setElementData(playerToReceive,"player:premium", true)
        triggerEvent("load:player",root,playerToReceive)
        triggerEvent("save:player",root,playerToReceive)
    else
        outputChatBox("B?‚?™dny Kod ("..responseData..")", playerToReceive)
--        outputChatBox("*B?‚?™dny Kod", client)
    end
    end
end

addCommandHandler("dajp",function(plr,cmd,cel,dni)
    if exports['dutyadmin']:getAdmin(plr,5) then
    if not cel then outputChatBox("/dajp [gracz] [dni]",plr) return end
    if not dni then outputChatBox("/dajp [gracz] [dni]",plr) return end
    if not tonumber(dni) then outputChatBox("/dajp [gracz] [dni]",plr) return end
        local target=exports["ogrpg-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 dla "..getPlayerName(target):gsub("#%x%x%x%x%x%x",""), plr)
        outputChatBox("Otrzymales konto Premium na "..dni.." dni od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), target)
        setElementData(target,"player:premium",true)
        triggerEvent("load:player",root,target)
        triggerEvent("save:player",root,target)
    end
end)

addCommandHandler("losujp",function(plr)
    if exports['dutyadmin']:getAdmin(plr,5) then
    local los = getRandomPlayer()
    if not los then return end
        setPremiumDay(los,15)
        outputChatBox("Losowanie konta Premium na 15 dzie?„..", root)
        outputChatBox("Losowe konto PREMIUM otrzymuje gracz o nicku "..getPlayerName(los):gsub("#%x%x%x%x%x%x","").." na 15 dzie?„", root)
        outputChatBox("Otrzymales konto Premium na 15 dzie?„.", los)
        setElementData(los,"player:premium",true)
        triggerEvent("load:player",root,los)
        triggerEvent("save:player",root,los)
    end
end)

addCommandHandler("losujp2",function(plr)
    if exports['dutyadmin']:getAdmin(plr,5) then
    local los2 = getRandomPlayer()
    if not los2 then return end
        setPremiumDay(los2,30)
        outputChatBox("Losowanie konta Premium na 30 dni..", root)
        outputChatBox("Losowe konto PREMIUM otrzymuje gracz o nicku "..getPlayerName(los2):gsub("#%x%x%x%x%x%x","").." na 30 dni!", root)
        outputChatBox("Otrzymales konto Premium na 30 dni.", los2)
        setElementData(los2,"player:premium",true)
        triggerEvent("load:player",root,los2)
        triggerEvent("save:player",root,los2)
    end
end)

addCommandHandler("losujp3",function(plr, cmd, dni)
    if exports['dutyadmin']:getAdmin(plr,5) then
    if not dni then outputChatBox("/losujp3 [dni]",plr) return end
    if not tonumber(dni) then outputChatBox("/losujp3 [dni]",plr) return end
    for k,v in ipairs(getElementsByType ( "player" )) do
    if not getElementData(v, "player:uid") then return end
        setPremiumDay(v,dni)
        setElementData(v,"player:premium",true)
        triggerEvent("load:player",root,v)
        triggerEvent("save:player",root,v)
        gracze=v
        --outputChatBox("Z powodu dobrego humoru "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","")..", ca?‚y serwer otrzyma?‚ Premium na "..dni.." dzie?„/dni!", root, 0, 192, 255)
    end
end
end)    

addCommandHandler("losujp3",function(plr,cmd,dni)
if exports['dutyadmin']:getAdmin(plr,5) then
outputChatBox("Z powodu dobrego humoru "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","")..", ca?‚y serwer otrzyma?‚ Premium na "..dni.." dzie?„/dni!", root, 0, 192, 255)
end
end)


addCommandHandler("wekp",function(plr,cmd,cel,dni)
    if exports['dutyadmin']:getAdmin(plr,5) then
    if not cel then outputChatBox("/wekp [gracz] [dni]",plr) return end
    if not dni then outputChatBox("/wekp [gracz] [dni]",plr) return end
    if not tonumber(dni) then outputChatBox("/wekp [gracz] [dni]",plr) return end
        local target=exports["ogrpg-core"]:findPlayer(plr,cel)
        if not target then
            outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
            return
        end
        setPremiumDay(target,dni)
        outputChatBox("#00FF00Gratulacje! #6666CCGracz #000033"..getPlayerName(target):gsub("#%x%x%x%x%x%x","").."#00CCCC wygrywa #FFFF00Konto Premium #9932CDna #660000"..dni.." #FF0000Dni", root,0,0,255,true)
        outputChatBox("#00FF66?»yczymy mi?‚ego korzystania z Konta Premium ",root,0,0,255,true)
        setElementData(target,"player:premium",true)
        triggerEvent("load:player",root,target)
        triggerEvent("save:player",root,target)
    end
end)



2 KOD


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.3661screenH 0.0004screenW 0.2690screenH 0.9999tocolor(000168), false)
        dxDrawLine((screenW 0.3655) - 1, (screenH 0.0733) - 1, (screenW 0.3655) - 1screenH 0.1200tocolor(0255,025), 1false)
        dxDrawLine(screenW 0.6351, (screenH 0.0733) - 1, (screenW 0.3655) - 1, (screenH 0.0733) - 1tocolor(1312636216), 1false)
        dxDrawLine((screenW 0.3655) - 1screenH 0.1200screenW 0.6351screenH 0.1200tocolor(1312636216), 1false)
        dxDrawLine(screenW 0.6351screenH 0.1200screenW 0.6351, (screenH 0.0733) - 1tocolor(1312636216), 1false)
        dxDrawRectangle(screenW 0.3655screenH 0.0733screenW 0.2696screenH 0.0467tocolor(000161), false)
        dxDrawText("SKLEP PREMIUM (Zamknij)"screenW 0.4310screenH * -0.1150screenW 0.5696screenH 0.3105tocolor(255255255255), 0.60"bankgothic""center""center"falsefalsefalsefalsefalse)
       dxDrawText("Aby zakupi?&#8225; Konto Premium musisz :".. 
       "\n 1. Wybra?&#8225; na ile dni chcesz kupi?&#8225; premium."..
       "\n 2. Wys?&#8218;a?&#8225; SMS na podan?&#8230; tre?&#8250;?&#8225; i numer."..
       "\n 3. W ciagu kilkudziesi?&#8482;ciu sekund otrzymasz na swoj telefon KOD, ktĂłry naleĹĽy wpisa?&#8225; w poniĹĽsze pole. "..
       "\n 4.Nacisnij przycisk SPRAWDZ jeĹĽeli kod b?&#8482;dzie prawid?&#8218;owy, konto premium zostanie automatycznie aktywowane! "..
       "\n\n\nAby zakupi?&#8225; Premium za PSC lub przelewem zg?&#8218;o?&#8250; si?&#8482; do HUNT3R'a. "..
       "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nWszelkie b?&#8218;?&#8482;dy prosimy zg?&#8218;asza?&#8225; do HUNT3R'a!"..
       ""screenW 0.3786screenH 0.1467screenW 0.6155screenH 0.4781tocolor(255255255255), 1.00"default""left""top"falsetruefalsefalsefalse)
        dxDrawLine((screenW 0.4179) - 1, (screenH 0.8752) - 1, (screenW 0.4179) - 1screenH 0.9210tocolor(0255,0255), 1false)
        dxDrawLine(screenW 0.5857, (screenH 0.8752) - 1, (screenW 0.4179) - 1, (screenH 0.8752) - 1tocolor(0255,02551), 1false)
        dxDrawLine((screenW 0.4179) - 1screenH 0.9210screenW 0.5857screenH 0.9210tocolor(0255,0255), 1false)
        dxDrawLine(screenW 0.5857screenH 0.9210screenW 0.5857, (screenH 0.8752) - 1tocolor(0255,0255), 1false)
        dxDrawRectangle(screenW 0.4179screenH 0.8752screenW 0.1679screenH 0.0457tocolor(00098), false)
        dxDrawText("Sprawdz"screenW 0.4561screenH 0.8818screenW 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.8848screenW 0.5452screenH 0.7048) and data.showed then
        if guiRadioButtonGetSelected(data.button[2]) then 
        amount "5098"
        number="71480" 
        elseif guiRadioButtonGetSelected(data.button[3]) then 
        amount "5102"
        number="73480"
        elseif guiRadioButtonGetSelected(data.button[4]) then 
        amount "4364"
        number="76480" 
        elseif guiRadioButtonGetSelected(data.button[5]) then  
        amount "5103"
        number="91400"
        end
        triggerServerEvent("premiumActive"localPlayerguiGetText(data.button[1]),amount,number)
        destroyElement(data.button[1])
        destroyElement(data.button[2])
        destroyElement(data.button[3])
        destroyElement(data.button[4])
        destroyElement(data.button[5])
        removeEventHandler("onClientRender"rootrenderZoneBox)
        data.showed=false
        showCursor(false)
        elseif isMouseIn(screenW 0.3655screenH 0.0500screenW 0.2696screenH 0.0467) and data.showed then
        destroyElement(data.button[1])
        destroyElement(data.button[2])
        destroyElement(data.button[3])
        destroyElement(data.button[4])
        destroyElement(data.button[5])
        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])
    destroyElement(data.button[3])
    destroyElement(data.button[4])
    destroyElement(data.button[5])
    removeEventHandler("onClientRender"rootrenderZoneBox)
    data.showed=false
    showCursor(false)
else
    addEventHandler("onClientRender"rootrenderZoneBox)
    data.button[1] = guiCreateEdit(0.400.770.210.05"Wpisz kod z SMS (8 znakowy)"true)
    data.button[2] = guiCreateRadioButton(0.380.430.250.08"Ilo?&#8250;?&#8225; dni: 1 dni. Wy?&#8250;lij SMS  o tre?&#8250;ci: ---\nNa numer: BRAK\nKoszt SMSa (brutto): 1.23 z?&#8218;."true,false)
    data.button[3] = guiCreateRadioButton(0.380.500.250.08"Ilo?&#8250;?&#8225; dni: 7 dni. Wy?&#8250;lij SMS  o tre?&#8250;ci: ---\nNa numer: BRAK\nKoszt SMSa (brutto): 3.69 z?&#8218;."true,false)
    data.button[4] = guiCreateRadioButton(0.380.570.250.08"Ilo?&#8250;?&#8225; dni: 30 dni. Wy?&#8250;lij SMS  o tre?&#8250;ci: ---\nNa numer: BRAK\nKoszt SMSa (brutto): 7.38 z?&#8218;."true,false)
    data.button[5] = guiCreateRadioButton(0.380.640.250.08"Ilo?&#8250;?&#8225; dni: 45 dni. Wy?&#8250;lij SMS  o tre?&#8250;ci: ---\nNa numer: BRAK\nKoszt SMSa (brutto): 17.22 z?&#8218;."true,false)
    guiRadioButtonSetSelected data.button[2], true )
    guiEditSetMaxLength(data.button[1], 27)
    data.showed=true
end
end
addCommandHandler('premium'premiumshow)


Komentarz Gregory. dodany 2018-12-18, 19:59Dodałem znaczniki [lua][/lua] do kodu.
Ostatnio zmieniony przez Nexisten 2018-12-18, 19:59, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-12-18, 20:47


Query

SyndicateMTA






Wiek: 24
Na forum: 3072 dni
Posty: 319
Nick w MP: Query

Piwa: 5257

Respekt: 141
Respekt: 141

wypelniles dobrze kod api z microsms?

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-12-18, 20:53


Samotny

5life.pl






Wiek: 22
Na forum: 3351 dni
Posty: 34
Nick w MP: Jabol

Piwa: 81

Respekt: 20,5

darecky02, W?a?nie ja nie wiem czy dobrze wszystko robi? dlatego potrzebuje pomocy bo nigdy tego nie robi?em.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-12-18, 20:55


Query

SyndicateMTA






Wiek: 24
Na forum: 3072 dni
Posty: 319
Nick w MP: Query

Piwa: 5257

Respekt: 141
Respekt: 141

Samotny, jesli mozesz to poka? kod api zakrywaj?c dane osobiste.

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-12-18, 21:24


Samotny

5life.pl






Wiek: 22
Na forum: 3351 dni
Posty: 34
Nick w MP: Jabol

Piwa: 81

Respekt: 20,5

A podpowiesz mi gdzie go znajde bo ja ca?ego tego procesu nie ogarniam.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-12-18, 21:29


Query

SyndicateMTA






Wiek: 24
Na forum: 3072 dni
Posty: 319
Nick w MP: Query

Piwa: 5257

Respekt: 141
Respekt: 141

W panelu microsms

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-12-18, 21:58


Samotny

5life.pl






Wiek: 22
Na forum: 3351 dni
Posty: 34
Nick w MP: Jabol

Piwa: 81

Respekt: 20,5

Stary jestem zielony w tym chodzi o to ?

ID #5381

[ Dodano: 2018-12-22, 19:19 ]
Potrzebuj? nadal pomocy, wie kto?? Jak to podpi???

[ Dodano: 2018-12-31, 00:42 ]
@refresh

[ Dodano: 2019-01-05, 19:54 ]
darecky02, Pomo?esz ?

Postaw piwo autorowi tego posta
 

 
Tagi: panel :: premium :: pod :: microsms
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Panel premium pod MicroSMS 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