mehmetejr
-
Posts
46 -
Joined
-
Last visited
Posts posted by mehmetejr
-
-
5 hours ago, MrTasty said:
This exception is thrown when the MTA's server HTTP agent returns a 404 error. This means either the resource 'classes' or the function '_getPlayerCount' doesn't exist on the server. This function is called from line 5 of footer.php which is included on line 12 of ucp.php.
well when I change the 22005 port, I don't get any errors but I cannot make connection between server and ucp...
-
Any1 help ?
-
Hi there. I have a UCP and I wanna connect SDK with it but whenever I enter credientals, I take this error (btw I am not sure how to fill SDK credientals , I need help about it as well )
Fatal error: Uncaught exception 'Exception' with message 'There was a problem with the request. Ensure that the resource exists and that the name is spelled correctly.' in C:\xampp\htdocs\classes\mta_sdk.php:171 Stack trace: #0 C:\xampp\htdocs\classes\mta_sdk.php(74): mta->do_post_request('188.165.168.148', '22005', '/classes/call/_...', '') #1 C:\xampp\htdocs\classes\mta_sdk.php(225): mta->callFunction('classes', '_getPlayerCount', Array) #2 C:\xampp\htdocs\footer.php(5): Resource->call('_getPlayerCount') #3 C:\xampp\htdocs\ucp.php(12): include('C:\\xampp\\htdocs...') #4 {main} thrown in C:\xampp\htdocs\classes\mta_sdk.php on line 171 -
11 minutes ago, DNL291 said:
Try:
for i=1, #quests do if not isThisQuestSelected(client, quests[i]) then table.insert(selectedQuests[client], quests[i]) end end
I think the problem is with my account-system.But thanks for helping anyway
4 minutes ago, ccw said:while #selectedQuests[client] < math.min(6,#quests) do local ran = math.random(1, #quests) if not isThisQuestSelected(client, quests[ran]) then table.insert(selectedQuests[client], quests[ran]) end end
I think this would be better
I think the problem is with my account-system.But thanks for helping anyway
Btw, sometimes I get the abort error with 68th line of script.Maybe this is the problem ? -
Any1 help ?
-
1 minute ago, ccw said:
This will loop forever if #quests < 6
while #selectedQuests[client] < 6 do local ran = math.random(1, #quests) if not isThisQuestSelected(client, quests[ran]) then table.insert(selectedQuests[client], quests[ran]) end end
So what u suggest for it ? I mean how can I fix it ? (I am new to scripting, so still learning)
-
Hi guys. I saw some topics about it but the problem is that I don't have timer in this script but it just gives that error anyway.(İnfinite/long execution). Can you tell me what the problem is with this script ?
Btw, these codes are not leaked at all...
local selectedQuests = {{}} function startStep11(retest) local remainHours, remainMinutes, remainSeconds = nil local userid = getElementData(client, "account:id") local faData = exports.mysql:query_fetch_assoc("SELECT (UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`forceapp_date`)) AS `secdiff` FROM `force_apps` WHERE `account`='"..userid.."' LIMIT 1") if faData and faData["secdiff"] and tonumber(faData["secdiff"]) then local secdiff = tonumber(faData["secdiff"]) local secsInADay = 60*60*24 -- sec,min,hour if secdiff < secsInADay then remainHours = math.floor((secsInADay-secdiff)/60/60) if remainHours <= 0 then remainMinutes = math.floor((secsInADay-secdiff)/60) if remainMinutes <= 0 then remainSeconds = math.floor(secsInADay-secdiff) end end else exports.mysql:query_free("DELETE FROM `force_apps` WHERE `account`='"..userid.."' ") end end selectedQuests[client] = {} local quests = {} local preparedQ = "" local mQuery = nil preparedQ = "SELECT * FROM `applications_questions` WHERE `part`='1' " mQuery = exports.mysql:query(preparedQ) while true do local row = exports.mysql:fetch_assoc(mQuery) if not row then break end table.insert(quests, row ) end exports.mysql:free_result(mQuery) while #selectedQuests[client] < 6 do local ran = math.random(1, #quests) if not isThisQuestSelected(client, quests[ran]) then table.insert(selectedQuests[client], quests[ran]) end end triggerClientEvent(client, "apps:step11", client, selectedQuests[client], retest, remainHours, remainMinutes, remainSeconds) selectedQuests[client] = nil end addEvent("apps:startStep11", true) addEventHandler("apps:startStep11", root, startStep11) function isThisQuestSelected(client, quest) for i = 1, #selectedQuests[client] do if quest == selectedQuests[client][i] then return true end end return false end function finishStep1() if source and isElement(source) and getElementType(source) == "player" then client = source end local id = getElementData(client, "account:id") if id then local preparedQuery = "UPDATE `accounts` SET `appstate`='1' WHERE `id`='"..id.."' " if exports.mysql:query_free(preparedQuery) then triggerEvent("apps:startStep2", client) end end end addEvent("apps:finishStep1", true) addEventHandler("apps:finishStep1", root, finishStep1)
-
Hi there.I have opened an amateur RP server and I have a problem with faction-system.The exact code is like:
<lua> local maxrow = mysql:fetch_assoc(max) maxIndex = tonumber(maxrow.id) or 0 </lua>
and the error I get on console is this:attemp to index local "maxrow" (a nill value) -
Somebody will help ?
-
local tutorialStage = {}
tutorialStage[1] = {1942.0830078125, -1738.974609375, 16.3828125, 1942.0830078125, -1760.5703125, 13.3828125} -- idlewood gas station//
tutorialStage[2] = {1538.626953125, -1675.9375, 19.546875, 1553.8388671875, -1675.6708984375, 16.1953125} --LSPD//
tutorialStage[3] = {2317.6123046875, -1664.6640625, 17.215812683105, 2317.4755859375, -1651.1640625, 17.221110343933} -- 10 green bottles//
tutorialStage[4] = {1742.623046875, -1847.7109375, 16.579560279846, 1742.1884765625, -1861.3564453125, 13.577615737915} -- Unity Station//
tutorialStage[5] = {1942.0830078125, -1738.974609375, 16.3828125, 1942.0830078125, -1760.5703125, 13.3828125} -- idlewood gas station//
tutorialStage[6] = {1538.626953125, -1675.9375, 19.546875, 1553.8388671875, -1675.6708984375, 16.1953125} --LSPD//
tutorialStage[7] = {2317.6123046875, -1664.6640625, 17.215812683105, 2317.4755859375, -1651.1640625, 17.221110343933} -- 10 green bottles//
tutorialStage[8] = {1742.623046875, -1847.7109375, 16.579560279846, 1742.1884765625, -1861.3564453125, 13.577615737915} -- Unity Station//
tutorialStage[9] = {1942.0830078125, -1738.974609375, 16.3828125, 1942.0830078125, -1760.5703125, 13.3828125} -- idlewood gas station//
tutorialStage[10] = {1538.626953125, -1675.9375, 19.546875, 1553.8388671875, -1675.6708984375, 16.1953125} --LSPD//
local stageTime = 15000
local fadeTime = 2000
local fadeDelay = 300
local tutorialTitles = {}
tutorialTitles[1] = "HOŞGELDİNİZ"
tutorialTitles[2] = "ADMİNLER"
tutorialTitles[3] = "ROLEPLAY"
tutorialTitles[4] = "IC VE OOC"
tutorialTitles[5] = "KOMUTLAR"
tutorialTitles[6] = "FACTIONLAR"
tutorialTitles[7] = "MG,PG,DM"
tutorialTitles[8] = "KURALLAR"
tutorialTitles[9] = "KARAKTER OLUŞTURMA"
tutorialTitles[10] = "DİKKAT EDİLMESİ GEREKENLER"
local tutorialText = {}
tutorialText[1] = {"Nirvana Roleplay'a Hoşgeldiniz.",
"Bu kısa bir anlatımdır.Lütfen birkaç dakikanızı ayırın.",
"Bu anlatımın sonunda kısa bır quiz olacaksınız.Yani anlatıma dikkatinizi verin.",
"Şu anda tamamen roleplay konseptinde olan sunuculardan biriyiz.",
"Duyuruları ve haberleri [url=http://www.facebook.com/ayyildizrolleplay1]http://www.facebook.com/ayyildizrolleplay1[/url] sayfasından takip edebilirsiniz"}
tutorialText[2] = {"Bu sunucudaki adminlerimiz yardımsever ve iyi huyludur,ve her zaman oyunculara saygılıdır.",
"Yardım lazım olunca F2 veya /report u kullanın.Oyun içi çözülmeyen problemlerinizi",
"forum sayfasından veya UCP den bize bildirim.",
"UCP adresimiz nirvana-roleplay.com"}
tutorialText[3] = {"Her zaman roleplay yapmalısınız.Bunun anlamı gerçek hayattaki gibi davranmaktır",
"GTA da yapılması mümkün olan şeylerin birçoğu bu sunucuda yasaktır.",
"Bu sunucuda faction lar olsada,her rolü yapmakta özgürsünüz.Fakat,bu rolleri",
"sunucu kurallarını takip ederek yapın."}
tutorialText[4] = {"Karakter İçi(IC) ve Karakter dışı(OOC) kavramlarını bilmeden iyi roleplay yapamazsınız",
"OOC sizin konuşmanızdır,yani karakterinizle hiçbir alakası yoktur.",
"Biriyle OOC konuşmak için, /o, /b ve /pm i kullanın. IC karakterinizin söylediği şeylerdir.",
"Yani yönlendirdiğiniz karakteri konuşturmanızdır. /t ile karakterinizi konuşturabilirsiniz."}
tutorialText[5] = {"Roleplay yaparken bazen komut kullanmanız gerekir.Özelliklede /me ve /do yu",
"/me karakterinizin yapmak üzere olduğu eylemi gerçekleştirir.Örn:/me sağ elini ceketinin cebine atıp sigara paketini çıkarır",
"/do ise karakterinizin özellikleri ve yaptığı şeyleri belirtir.Örn: /do dudağının altında uçuk çıkmıştur. /do sigara yanmıştır",
"Roleplay yaparken bu komutları kullanın.OOC konuşmayın."}
tutorialText[6] = {"Sunucumuzda çeşitli factionlar vardır.Tabi bu factionlara kafanıza göre giremezsiniz",
"Her faction belli bir rol düzeyi gerektirir.Factionlar hakkında bilgi almak için /report atabilirsiniz",
"İlla illegal bir faction mensubu olmanız gerekmez,legal roller de yapabilirsiniz.Factionlar'ı forum sayfamızda görebilirsiniz",
"Forum: forum.nirvana-roleplay.com"}
tutorialText[7] = {"Sunucumuzda farkettiğiniz gibi belli kurallar vardır.Mesela,DM,MG,PG yasaktır",
"MG(MetaGaming),IC bilgilerinizi OOC veya /pm de paylaşmanız anlamına gelir ve kesinlikle yasaktır",
"PG(PowerGaming),Superman gibi davranmak veya birine zorla rol yaptırmaktır ve kesinlikle yasaktır",
"Daha fazla bilgi için oyun içi F1 veya adminlerden yardım alabilirsiniz"}
tutorialText[8] = {"Sunucuda çok sayıda dikkat edilmesi gereken kurallar vardır.",
"Kurallara uyulmadan roleplay yapılmaz,yani ne siz zevk alırsınız ne de adminler bu konudan hoşnut olur",
"Kuralları öğrenmek için F1 den veya adminlerden yardım alabilirsiniz.",
"Aynı zamanda Google'dan roleplay araştırması yaparak kuralları detaylı öğrenebilirsiniz"}
tutorialText[9] = {"Karakter oluşturmak için bir ad soyada ihtiyacınız vardır.",
"Uygun ad-soyad formatıda şu şekildedir:İsim-Soyisim.Ünlü ismi kullanmak yasaktır",
"Oluşturduktan sonra karakterinizi istedğiniz meslekte veya huyda yönetebilirsiniz.",
"Daha fazla bilgi için adminlerden yardım alabilirsiniz"}
tutorialText[10] = {"Bu sunucuda hile kullanmak,bug bulup suistimal etmek veya diğer sunucuların reklamını yapmak yasaktır",
"Eğer hile kullan birini görürseniz,bug bulursanız veya reklam yapan biri varsa hemen /report ediniz.",
"Hile kullananlar,bug suistimali yapanlar ve reklam yapanlar anında süresiz banlanacaktır.",
"Daha fazla bilgi için adminlerden yardım alabilirsiniz"}
-- function starts the tutorial
function
local thePlayer = getLocalPlayer()
-- set the player to not logged in so they don't see any other random chat
triggerServerEvent("player:loggedout", getLocalPlayer())
-- if the player hasn't got an element data, set it to 1
if not (getElementData(thePlayer, "tutorialStage")) then
setElementData(thePlayer, "tutorialStage", 0, false)
end
-- ionc
setElementData(thePlayer, "tutorialStage", getElementData(thePlayer, "tutorialStage")+1, false)
-- stop the player from using any controls to move around or chat
toggleAllControls ( false )
-- fade the camera to black so they don't see the teleporting renders
fadeCamera ( false, fadeTime/1000 ,0,0,0)
-- timer to move the camera to the first location as soon as the screen has gone black.
setTimer(function()
-- timer to set camera position and fade in after the camera has faded out to black
setTimer(function()
local stage = getElementData(thePlayer, "tutorialStage")
local camX = tutorialStage[stage][1]
local camY = tutorialStage[stage][2]
local camZ = tutorialStage[stage][3]
local lookX = tutorialStage[stage][4]
local lookY = tutorialStage[stage][5]
local lookZ = tutorialStage[stage][6]
setCameraMatrix(camX, camY, camZ, lookX, lookY, lookZ)
-- set the element to outside and dimension 0 so they see th eother players
setElementInterior(thePlayer, 0)
setElementDimension(thePlayer, 0)
-- fade the camera in
fadeCamera( true, fadeTime/1000)
-- call function to output the text
outputTutorialText(stage)
-- function to fade out after message has been displayed a read
setTimer(function()
local lastStage = getLastStage()
-- if the player is on the last stage of the tutorial, fade their camera out and...
if(stage == lastStage) then
fadeCamera( false, fadeTime/1000, 0,0,0)
setTimer(function()
-- show the quiz after a certain time
endTutorial()
setElementData ( thePlayer, "tutorialStage", 0, false )
end, fadeTime+fadeDelay,1 )
else -- else more stages to go, show the next stage
showTutorial(thePlayer)
end
end, stageTime, 1)
end, 150, 1)
end, fadeTime+fadeDelay , 1)
end
-- function returns the number of stages
function getLastStage()
local lastStage = 0
if(tutorialStage) then
for i, j in pairs(tutorialStage) do
lastStage = lastStage + 1
end
end
return lastStage
end
-- function outputs the text during the tutorial
function outputTutorialText( stage)
outputChatBox(" ")
outputChatBox(" ")
outputChatBox(" ")
outputChatBox(" ")
outputChatBox(" ")
outputChatBox(" ")
outputChatBox(" ")
outputChatBox(" ")
outputChatBox(" ")
outputChatBox(tutorialTitles[stage], 255, 0,0, true)
outputChatBox(" ")
if(tutorialText[stage]) then
for i, j in pairs(tutorialText[stage]) do
outputChatBox(j)
end
end
end
-- function fade in the camera and sets the player to the quiz room so they can do the quiz
function endTutorial()
local thePlayer = getLocalPlayer()
-- set the player to not logged in so they don't see the chat
triggerServerEvent("player:loggedout", getLocalPlayer())
toggleAllControls(false)
setTimer(function()
setCameraMatrix(368.0419921875, -2008.1494140625, 7.671875, 383.765625, -2020.935546875, 10.8359375)
-- fade the players camera in
fadeCamera(true, 2)
-- trigger the client to start showing the quiz
setTimer(function()
triggerEvent("onClientStartQuiz", thePlayer)
end, 2000, 1)
end, 100, 1)
end
------------ TUTORIAL QUIZ SECTION - SCRIPTED BY PETER GIBBONS, AKA JASON MOORE --------------
questions = { }
questions[1] = {"RP terimi ne anlama gelir ?", "Real Playing", "Role Playing", "Record Playing", "Route Playing", 2}
questions[2] = {"Ne şartlarda veya ne zaman diğer sunucuların reklamını yapabilirsin ?", "/ad'i kullanarak", "OOC'den", "PM'den (/pm)", "Asla", 4}
questions[3] = {"Hile kullanan birisini görünce ne yapmalısın?", "/report ile adminlere haber vermek", "Boşvermek", "Hileciye /w yolu ile durmasını söylemek", "OOC'den şikayet etmek", 1}
questions[4] = {"UCP adresimiz nedir?", "www.nirvana-roleplay.com", "www.nirvanaroleplay.tk", "www.nirvanarp.net", "www.mtaroleplay.com", 1}
questions[5] = {"Los Santos'un diğer bölgelerine gitmek için ne yapmalısın?", "Adminlerden birine ışınlamasını söylemek.", "Roleplay yaparak gitmek,taksi çağırmak gibi.", "Hızlı gitmek için bunnyhopping yapmak", "Rastgele birinin arabasına binip seni bırakmasını söylemek.", 2}
questions[6] = {"Karakter oluşturmak için hangi formatı kullanmalısın?", "İsim", "isim-soyisim", "İsim-Soyisim", "Herhangi bir format yok", 3}
questions[7] = {"Bu isimlerden hangiisi kabul edilebilir?", "David Beckham", "Ahmet Cavus", "Roleplayer 420", "Hepsi", 2}
questions[8] = {"Ne zaman bu sunucuda roleplay yapmalısın?", "Her zaman", "Asla", "Kafana göre", "Oyuncu varken", 1}
questions[9] = {"Kaza ile arabayla uçurumdan atlayınca ne yapmalısın?", "Sürmeye devam et,nede olsa patlamadı", "Bir admiinden seni tepeye çıkarmasını iste", "OOC kaza olduğunu söyle", "Dur ve bir araç kazası rolü yap", 4}
questions[10] = {"Bir çete veya mafyaya katılmak istiyorum.Nasıl yapmalıyım?", "Adminden seni faction'a koymasını iste", "OOC den faction a katılmak iste", "Seni davet edene kadar çete/mafya ile rol yap.", "Hiçbiri", 3}
questions[11] = {"OOC ne demektir?", "Kontrol Dışı", "Karakter Dışı", "Şanssızlık", "Kahvenin Bitmesi", 2}
questions[12] = {"IC ne demektir?", "Karakter İçi", "Kaos İçinde", "Araç içinde", "Hiçbiri", 1}
questions[13] = {"MetaGaming nedir?", "Sebepsiz yere birini öldürmek", "Gerçekçi olmayan birşey yapmak", "Diğer oyuncularla zorla roleplay yapma", "OOC yi IC durumlarda kullanmak", 4}
questions[14] = {"Hangisi sunucu kurallarındandır?", "Roleplay yapma", "DeathMatching yapma", "Araç sürme", "Ateş etme", 2}
questions[15] = {"Bir admine ulaşmak istesen ne yapardın?", "/report u kullanmak", "Global OOC'den bir admine danışmak", "Admin'e PM atmak", "Admin'e IC den sormak.", 1}
-- variable for the max number of possible questions
local NoQuestions = 15
local NoQuestionToAnswer = 15
local correctAnswers = 0 -
Hi.I got a tutorial quiz script related yo account system.But I can't make it work.It must shown after players signs up or old players signs in again.And it shouldn't be closed by players.Can you guys help me how can I make it?(it must be just like in owlmta)
-
triggerClientEvent(
root,-- target
"onLock",-- event
vehicle -- vehicle = source
)
What I have to write instead of "unlock" ?
-
What I have to write instead of "onLock"
-
Hello I want to add dufflebag as item and I got a system works with command,but I want to do it like this:When player opens their inventory(roleplay server),they right-click on it and dufflebag comes to ped.And when right-click again,it must be disappeared.í
-
createVehicle spawnVehicle
Click on top of that , but it do I want?
-
Click on the red text
guiCreateButton guiCreateGridList
I want a feature which allows players to spawn a car to them who has enough donpoints.
-
Hello.I got roleplay script and I want to change and add something on f7 panel (donator panel - donate perk).Can you tell me how?
(I want to add some cars)
-
Hello there
I would like to add interior How to roleplay serverice I do about it?
-
Hi there,
I can not serverice roleplay with tower-system.
There's no such thing as createcolpolygo.
createColPolygon to colshap the (float fx, float fy, float FX1, FY1 float, float, FX2, FY2 float, float, FX3, FY3 float, ...)
How do I do it?
Float fx fy, fx1 fy1 how?
-
$Config['database'] needs to have the same connection info as your server.
$Config['server'] needs to have your server connection info. Username and password need to be the account details for an admin action, but I don't know what hashkey suppose to be.
What do you mean with my server connection info(username and pass?)
-
From a wild guess I would say that the hash key is probably a way to choose encryption algorithm for user accounts, you could try 'md5', 'sha2' or similar in that field, if it doesn't work you'll find out. I still believe that you got scammed with this script though: https://forum.multitheftauto.com/viewtopic.php?f=91&t=79817.$Config['database'] needs to have the same connection info as your server.
$Config['server'] needs to have your server connection info. Username and password need to be the account details for an admin action, but I don't know what hashkey suppose to be.
private $useCurl = false;
private $sockTimeout = 6; // seconds
public $http_username = '';
public $http_password = '';
public $host = '';
public $port = '';
private $resources = array();
public function __construct( $host, $port, $username = "", $pass = "" )
{
$this->host = $host;
$this->port = $port;
$this->http_username = $username;
$this->http_password = $pass;
shat does it mean? what should I do in this section ?
-
From a wild guess I would say that the hash key is probably a way to choose encryption algorithm for user accounts, you could try 'md5', 'sha2' or similar in that field, if it doesn't work you'll find out. I still believe that you got scammed with this script though: https://forum.multitheftauto.com/viewtopic.php?f=91&t=79817.
private $useCurl = false;
private $sockTimeout = 6; // seconds
public $http_username = '';
public $http_password = '';
public $host = '';
public $port = '';
private $resources = array();
public function __construct( $host, $port, $username = "", $pass = "" )
{
$this->host = $host;
$this->port = $port;
$this->http_username = $username;
$this->http_password = $pass;
shat does it mean? what should I do in this section ? oq
-
-
Just put it on a web host?
Hmm,
// Server Database
$ Config ['database'] = array ();
$ Config ['database'] ['hostname'] = 'localhost';
$ Config ['database'] ['username'] = '';
$ Config ['database'] ['password'] = '';
$ Config ['database'] ['database'] = '';
$ Config ['SMTP'] = array ();
$ Config ['SMTP'] ['hostname'] = "127.0.0.1";
$ Config ['SMTP'] ['port'] = 25;
$ Config ['SMTP'] ['username'] = '';
$ Config ['SMTP'] ['password'] = '';
$ Config ['SMTP'] ['from'] = '';
$ Config ['server'] = array ();
$ Config ['server'] ['hostname'] = 'localhost';
$ Config ['server'] ['username'] = '';
$ Config ['server'] ['password'] = "";
$ Config ['server'] ['hashkey'] = '';
Hashkey did not understand?
What do you mean?
How do I fill out?
'server' and 'database' What is the difference?
Problem with PHP SDK
in Scripting
Posted · Edited by mehmetejr
There is a resource in the server named " usercontrolpanel ".
Actually, I made the connection between servers but the problem is that I cannot click transfer icon when I change port to 80...