Wysłany: 2018-12-18, 17:30
Samotny
5life.pl
Wiek: 22 Na forum: 3351 dni Posty: 34
Nick w MP: Jabol
Piwa : 81
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
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
B??dy jakie?? Kawa?ek skryptu odpowiedzialny za to?
Wysłany: 2018-12-18, 19:12
Samotny
5life.pl
Wiek: 22 Na forum: 3351 dni Posty: 34
Nick w MP: Jabol
Piwa : 81
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
Wysłany: 2018-12-18, 19:26
Nexisten
Moderator
Wiek: 22 Na forum: 4107 dni Posty: 551
Nick w MP: Nexisten
Piwa : 1479
Nikt Ci nie wyczaruje rozwi?zania je?li nie poka?esz skrawka lub ca?ego kodu.
Wysłany: 2018-12-18, 19:38
Samotny
5life.pl
Wiek: 22 Na forum: 3351 dni Posty: 34
Nick w MP: Jabol
Piwa : 81
1 KOD
[[
Code write by Yolos . Permissions to use only by agree from Yolos .
]]
function RGBToHex ( red , green , blue , alpha )
if ( ( red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255 ) or ( alpha and ( alpha < 0 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 ( plr ) then
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 x 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 ( amount ) then
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 )
fetchRemote ( query , result , "" , false , client , amount , number )
end )
function result ( responseData , errno , playerToReceive , 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 = nil , button ={}}
local screenW , screenH = guiGetScreenSize ()
local sx , sy = 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.3661 , screenH * 0.0004 , screenW * 0.2690 , screenH * 0.9999 , tocolor ( 0 , 0 , 0 , 168 ), false )
dxDrawLine (( screenW * 0.3655 ) - 1 , ( screenH * 0.0733 ) - 1 , ( screenW * 0.3655 ) - 1 , screenH * 0.1200 , tocolor ( 0 , 255 , 0 , 25 ), 1 , false )
dxDrawLine ( screenW * 0.6351 , ( screenH * 0.0733 ) - 1 , ( screenW * 0.3655 ) - 1 , ( screenH * 0.0733 ) - 1 , tocolor ( 131 , 26 , 36 , 216 ), 1 , false )
dxDrawLine (( screenW * 0.3655 ) - 1 , screenH * 0.1200 , screenW * 0.6351 , screenH * 0.1200 , tocolor ( 131 , 26 , 36 , 216 ), 1 , false )
dxDrawLine ( screenW * 0.6351 , screenH * 0.1200 , screenW * 0.6351 , ( screenH * 0.0733 ) - 1 , tocolor ( 131 , 26 , 36 , 216 ), 1 , false )
dxDrawRectangle ( screenW * 0.3655 , screenH * 0.0733 , screenW * 0.2696 , screenH * 0.0467 , tocolor ( 0 , 0 , 0 , 161 ), false )
dxDrawText ( "SKLEP PREMIUM (Zamknij)" , screenW * 0.4310 , screenH * - 0.1150 , screenW * 0.5696 , screenH * 0.3105 , tocolor ( 255 , 255 , 255 , 255 ), 0.60 , "bankgothic" , "center" , "center" , false , false , false , false , false )
dxDrawText ( "Aby zakupi?‡ Konto Premium musisz :" ..
"\n 1. Wybra?‡ na ile dni chcesz kupi?‡ premium." ..
"\n 2. Wys?‚a?‡ SMS na podan?… tre?›?‡ i numer." ..
"\n 3. W ciagu kilkudziesi?™ciu sekund otrzymasz na swoj telefon KOD, ktĂłry naleĹĽy wpisa?‡ w poniĹĽsze pole. " ..
"\n 4.Nacisnij przycisk SPRAWDZ jeĹĽeli kod b?™dzie prawid?‚owy, konto premium zostanie automatycznie aktywowane! " ..
"\n\n\nAby zakupi?‡ Premium za PSC lub przelewem zg?‚o?› si?™ 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?‚?™dy prosimy zg?‚asza?‡ do HUNT3R'a!" ..
"" , screenW * 0.3786 , screenH * 0.1467 , screenW * 0.6155 , screenH * 0.4781 , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , "default" , "left" , "top" , false , true , false , false , false )
dxDrawLine (( screenW * 0.4179 ) - 1 , ( screenH * 0.8752 ) - 1 , ( screenW * 0.4179 ) - 1 , screenH * 0.9210 , tocolor ( 0 , 255 , 0 , 255 ), 1 , false )
dxDrawLine ( screenW * 0.5857 , ( screenH * 0.8752 ) - 1 , ( screenW * 0.4179 ) - 1 , ( screenH * 0.8752 ) - 1 , tocolor ( 0 , 255 , 0 , 2551 ), 1 , false )
dxDrawLine (( screenW * 0.4179 ) - 1 , screenH * 0.9210 , screenW * 0.5857 , screenH * 0.9210 , tocolor ( 0 , 255 , 0 , 255 ), 1 , false )
dxDrawLine ( screenW * 0.5857 , screenH * 0.9210 , screenW * 0.5857 , ( screenH * 0.8752 ) - 1 , tocolor ( 0 , 255 , 0 , 255 ), 1 , false )
dxDrawRectangle ( screenW * 0.4179 , screenH * 0.8752 , screenW * 0.1679 , screenH * 0.0457 , tocolor ( 0 , 0 , 0 , 98 ), false )
dxDrawText ( "Sprawdz" , screenW * 0.4561 , screenH * 0.8818 , screenW * 0.5452 , screenH * 0.7048 , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , "bankgothic" , "left" , "top" , false , false , false , false , false )
end
addEventHandler ( "onClientClick" , root , function( btn , state )
if btn == "left" and state == "down" then
if isMouseIn ( screenW * 0.4601 , screenH * 0.8848 , screenW * 0.5452 , screenH * 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" , localPlayer , guiGetText ( 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" , root , renderZoneBox )
data . showed = false
showCursor ( false )
elseif isMouseIn ( screenW * 0.3655 , screenH * 0.0500 , screenW * 0.2696 , screenH * 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" , root , renderZoneBox )
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" , root , renderZoneBox )
data . showed = false
showCursor ( false )
else
addEventHandler ( "onClientRender" , root , renderZoneBox )
data . button [ 1 ] = guiCreateEdit ( 0.40 , 0.77 , 0.21 , 0.05 , "Wpisz kod z SMS (8 znakowy)" , true )
data . button [ 2 ] = guiCreateRadioButton ( 0.38 , 0.43 , 0.25 , 0.08 , "Ilo?›?‡ dni: 1 dni. Wy?›lij SMS o tre?›ci: ---\nNa numer: BRAK\nKoszt SMSa (brutto): 1.23 z?‚." , true , false )
data . button [ 3 ] = guiCreateRadioButton ( 0.38 , 0.50 , 0.25 , 0.08 , "Ilo?›?‡ dni: 7 dni. Wy?›lij SMS o tre?›ci: ---\nNa numer: BRAK\nKoszt SMSa (brutto): 3.69 z?‚." , true , false )
data . button [ 4 ] = guiCreateRadioButton ( 0.38 , 0.57 , 0.25 , 0.08 , "Ilo?›?‡ dni: 30 dni. Wy?›lij SMS o tre?›ci: ---\nNa numer: BRAK\nKoszt SMSa (brutto): 7.38 z?‚." , true , false )
data . button [ 5 ] = guiCreateRadioButton ( 0.38 , 0.64 , 0.25 , 0.08 , "Ilo?›?‡ dni: 45 dni. Wy?›lij SMS o tre?›ci: ---\nNa numer: BRAK\nKoszt SMSa (brutto): 17.22 z?‚." , true , false )
guiRadioButtonSetSelected ( data . button [ 2 ], true )
guiEditSetMaxLength ( data . button [ 1 ], 27 )
data . showed = true
end
end
addCommandHandler ( 'premium' , premiumshow )
Ostatnio zmieniony przez Nexisten 2018-12-18, 19:59, w całości zmieniany 1 raz
Wysłany: 2018-12-18, 20:47
Query
SyndicateMTA
Wiek: 24 Na forum: 3072 dni Posty: 319
Nick w MP: Query
Piwa : 5257
wypelniles dobrze kod api z microsms?
Wysłany: 2018-12-18, 20:53
Samotny
5life.pl
Wiek: 22 Na forum: 3351 dni Posty: 34
Nick w MP: Jabol
Piwa : 81
darecky02 , W?a?nie ja nie wiem czy dobrze wszystko robi? dlatego potrzebuje pomocy bo nigdy tego nie robi?em.
Wysłany: 2018-12-18, 20:55
Query
SyndicateMTA
Wiek: 24 Na forum: 3072 dni Posty: 319
Nick w MP: Query
Piwa : 5257
Samotny , jesli mozesz to poka? kod api zakrywaj?c dane osobiste.
Wysłany: 2018-12-18, 21:24
Samotny
5life.pl
Wiek: 22 Na forum: 3351 dni Posty: 34
Nick w MP: Jabol
Piwa : 81
A podpowiesz mi gdzie go znajde bo ja ca?ego tego procesu nie ogarniam.
Wysłany: 2018-12-18, 21:29
Query
SyndicateMTA
Wiek: 24 Na forum: 3072 dni Posty: 319
Nick w MP: Query
Piwa : 5257
Wysłany: 2018-12-18, 21:58
Samotny
5life.pl
Wiek: 22 Na forum: 3351 dni Posty: 34
Nick w MP: Jabol
Piwa : 81
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 ?
Tagi: panel :: premium :: pod :: microsms
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: