-
Posts
4,961 -
Joined
-
Last visited
Everything posted by Jaysds1
-
Did you set up your server properly? Because only admins would be allowed to access more than the resourcebrowser. https://wiki.multitheftauto.com/wiki/Se ... ng_started
-
What does it say when you try to go onto the page?
-
If you want to start the webstats and the webmap, then in the console(the black box window), type in 'start webmap' and 'start webstats', after they would be started, or you could use the 'resourcebrowser' and start then by simply scrolling to the W section/table and click on them then start them.
-
If your maps are still in the 'resources' folder, then map editor should be able to find them, unless you reinstalled MTA in a different folder. If you reinstalled MTA in the same folder as the maps are in then, maybe your maps meta.xml info aren't correct.
-
ya, when you access your servers website(basically called that), you would need to enter in your username and password. After you finish entering those then you should be redirected to the resourcebrowser and in the resourcebrowser, you could start/stop/restart any resource in there. Now about the Webmap and Webstats, if you didn't already started it, you would need to start them in order to use them on the server website. If they are started, then you could go to their page and edit what you need or see what you want to see.
-
just use this function: guiSetPosition--moves the image getCursorPosition --gets the cursor position
-
copy the code again from above, I've edited it
-
ok, try this: local checkSave = dbQuery( test_db, "SELECT * FROM accounts WHERE serial=?", getPlayerSerial(source) ) local result = dbPoll( checkSave, -1 ) for i,v in pairs(result)do for _,b in ipairs(v)do outputChatBox(i..":"..b) end end
-
try this: local checkSave = dbQuery( test_db, "SELECT * FROM accounts WHERE serial=?", getPlayerSerial(source) ) local result = dbPoll( checkSave, -1 ) for i,v in pairs(result)do outputChatBox(i..":"..v) end
-
try this: addEventHandler ( "onPlayerConnect", getRootElement(),function(nick) if(string.find(nick,"#"))then cancelEvent(true,"Your name contains a ColorCode!") end end)
-
You probably need to login or something...
-
wait, so your ban system doesn't kick the player out, it just not makes the player play?
-
Resource page features
Jaysds1 replied to rain_gloom's topic in Site/Forum/Discord/Mantis/Wiki related
I think he means in the community. -
ok, You wanna know why it doesn't work? It's because your trying to get element data's that are destroyed when you leave the server, I would recommend you to use accounts instead.
-
I really think you don't need 'onClientResourceStart' in it. Anyway, try this: polesToFix = { {1332.9365234375, -1411.30078125, 12}, {1470.1435546875, -1447.119140625, 12}, {1515.50390625, -1586.787109375, 12}, {1544.9814453125, -1726.63671875, 12}, {1460.6865234375, -1420.0810546875, 12}, {1863.583984375, -1255.1982421875, 12}, {2061.3095703125, -1289.392578125, 22.5}, {1862.3125, -1455.162109375, 12.2} } local markerjob = createMarker( 733.13671875, -1347.9580078125, 13.510824203491, "Cylinder", 1.5, 0, 0, 255, 150) local skins = {"Electrician (skin: 16)"} windowjob = guiCreateWindow(0.700,0.28,0.2800,0.4500,"Electrician job",true) guiSetVisible(windowjob, false) infomemo = guiCreateMemo(0.0347,0.0600,0.9369,0.4100,"As an electrician, you will go around the city of Los Santos, to the red flag, and fix the poles.",true,windowjob) skinsgrid = guiCreateGridList(0.0347,0.5300,0.9369,0.350,true,windowjob) guiGridListSetSelectionMode(skinsgrid,2) _skins = guiGridListAddColumn(skinsgrid,"Skins",0.95) takebtn = guiCreateButton(0.1000,0.9000,0.3000,0.0700,"Accept",true,windowjob) closebtn = guiCreateButton(0.6000,0.9000,0.3000,0.0700,"Cancel",true,windowjob) infolbl = guiCreateLabel(0.2681,0.4800,0.4637,0.0538,"Choose your skin :",true,windowjob) guiLabelSetColor(infolbl,255,255,255) guiLabelSetVerticalAlign(infolbl,"center") guiLabelSetHorizontalAlign(infolbl,"center",false) guiSetFont(infolbl,"default-bold-small") local resX, resY = guiGetScreenSize() local width2, height2 = 1269, 75 local X2 = resX / 2 - width2 / 2 local Y2 = resY / 2 - height2 / 2 jobs_electitian_label_timeLeft = guiCreateLabel(X2, Y2, width2, height2, "Time until finished: ", false) guiSetPosition(jobs_electitian_label_timeLeft, 10, 10, false) guiSetVisible(jobs_electitian_label_timeLeft, false) guiSetFont(jobs_electitian_label_timeLeft, "sa-header") guiLabelSetColor(jobs_electitian_label_timeLeft, 5, 221, 35) guiLabelSetHorizontalAlign(jobs_electitian_label_timeLeft, "center", false) guiLabelSetVerticalAlign(jobs_electitian_label_timeLeft, "center") for index, skin in ipairs(skins) do local row = guiGridListAddRow (skinsgrid) guiGridListSetItemText(skinsgrid, row, _skins, tostring(skin), false, false) end addEventHandler("onClientGUIClick", root, function () if (source == takebtn) then local row,col = guiGridListGetSelectedItem(skinsgrid) if (row and col and row ~= -1 and col ~= -1) then local skinName = guiGridListGetItemText(skinsgrid, row, 1) if skinName == "Electrician (skin: 16)" then triggerServerEvent("electrition:takeJob",localPlayer, 16) end guiSetVisible ( windowjob, false ) showCursor ( false ) else outputChatBox("Please,select a skin of the list.",255,0,0) end elseif (source == closebtn) then guiSetVisible ( windowjob, false ) showCursor ( false ) end end) function Elecjob(hitElement, dimension) if (hitElement == localPlayer) then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", markerjob, Elecjob) function Elecjobleave(leaveElement, dimension) if getElementType(leaveElement) == "player" and (leaveElement == localPlayer) then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", markerjob, Elecjobleave) function removeElecWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", closebtn , removeElecWindow, false) function createPoleMarkerAndBlip() if eventName == "onClientResourceStart" then source = localPlayer end --this will change source to localPlayer if it's the onClientResourceStart event if getElementData(source, "Occupation") == "Electrician" and getElementType(source) == 'player' then part = math.random(1, #polesToFix) x = polesToFix[part] y = polesToFix[part] z = polesToFix[part] electritionPoleMarker = createMarker(x, y, z, "cylinder", 3, 200, 200, 0, 85, source) setElementData(electritionPoleMarker, "Electrician", "poleMarker", true) electritonPoleBlip = createBlip(x, y, z, 19) end end addEvent("electrition:createPoles", true) addEventHandler("electrition:createPoles", root, createPoleMarkerAndBlip) addEventHandler("onClientPlayerJoin", root, createPoleMarkerAndBlip) addEventHandler("onClientResourceStart", resourceRoot, createPoleMarkerAndBlip) addEventHandler("onClientMarkerHit", electritionPoleMarker, function(player) if getElementType(player) ~= "player" or doesPedHaveJetPack( player ) then --check if the element is not a player or if the player has an jetpack (BTW, doesPlayerHaveJetPack is not used anymore!) outputChatBox("Get out of the vehicle, to fix the pole.", 255, 0, 0) return end if player == localPlayer and getElementData(player, "Occupation") == "Electrician" then setElementFrozen(player, true) showCursor(true) guiSetVisible(jobs_electitian_label_timeLeft, true) triggerServerEvent("electrain:fixPole:animation", player) guiSetText(jobs_electitian_label_timeLeft, "Time Left: 6") local timer = 5 setTimer(function() --shortened the code timer = timer - 1 if timer==5 then guiSetText(jobs_electitian_label_timeLeft, "Time Left: 5") end if timer==4 then guiSetText(jobs_electitian_label_timeLeft, "Time Left: 4") end if timer==3 then guiSetText(jobs_electitian_label_timeLeft, "Time Left: 3") end if timer==2 then guiSetText(jobs_electitian_label_timeLeft, "Time Left: 2") end if timer==1 then guiSetText(jobs_electitian_label_timeLeft, "Time Left: 1") end end, 1000, 5) startTimerWhenMarkerHit = setTimer(function() timer = null --unset the var timer destroyElement(electritonPoleBlip) destroyElement(electritionPoleMarker) triggerEvent("electrition:createPoles", player) triggerServerEvent("electrition:fixPole", player) showCursor(false, false) setElementFrozen(player, false) guiSetVisible(jobs_electitian_label_timeLeft, false) end, 6000, 1,player,timer) end end)
-
Anderl is right, for an example: '%PATH_TO_GAMEQ%' would be '%PROGRAMFILES%\GameQ' if you haven't changed the Folder name.
-
try this: function createPoleMarkerAndBlip() if getElementData(source, "Occupation") != "Electrician" then return end local x, y, z = unpackPoles() electritionPoleMarker = createMarker(x, y, z, "cylinder", 3, 200, 200, 0, 85, localPlayer) setElementData(electritionPoleMarker, "Electrician", "poleMarker", true) electritonPoleBlip = createBlip(x, y, z, 19) end addEvent("electrition:createPoles", true) addEventHandler("electrition:createPoles", root, createPoleMarkerAndBlip) addEventHandler("onClientPlayerJoin", root, createPoleMarkerAndBlip) addEventHandler("onClientResourceStart", root, createPoleMarkerAndBlip) addEventHandler("onClientMarkerHit", electritionPoleMarker, function(player) if getElementType(player) != "player" or doesPedHaveJetPack( player ) ) then --check if the element is not a player or if the player has an jetpack (BTW, doesPlayerHaveJetPack is not used anymore!) outputChatBox("Get out of the vehicle, to fix the pole.", 255, 0, 0) return end if player == localPlayer and getElementData(player, "Occupation") == "Electrician" then setElementFrozen(player, true) showCursor(true) guiSetVisible(jobs_electitian_label_timeLeft, true) triggerServerEvent("electrain:fixPole:animation", localPlayer) guiSetText(jobs_electitian_label_timeLeft, "Time Left: 6") local timer = 5 setTimer(function() --shortened the code timer = timer - 1 if timer==5 then guiSetText(jobs_electitian_label_timeLeft, "Time Left: 5") end if timer==4 then guiSetText(jobs_electitian_label_timeLeft, "Time Left: 4") end if timer==3 then guiSetText(jobs_electitian_label_timeLeft, "Time Left: 3") end if timer==2 then guiSetText(jobs_electitian_label_timeLeft, "Time Left: 2") end if timer==1 then guiSetText(jobs_electitian_label_timeLeft, "Time Left: 1") end end, 1000, 5) startTimerWhenMarkerHit = setTimer(function() timer = null --unset the var timer destroyElement(electritonPoleBlip) destroyElement(electritionPoleMarker) triggerEvent("electrition:createPoles", player) triggerServerEvent("electrition:fixPole", player) showCursor(false, false) setElementFrozen(player, false) guiSetVisible(jobs_electitian_label_timeLeft, false) end, 6000, 1) end end)
-
try downloading the resources again: http://code.google.com/p/mtasa-resource ... p&can=2&q= and try map editor again.
-
Here: viewtopic.php?f=13&t=29363&hilit=+Wiki&start=60#p479878
-
try this: exports [ 'scoreboard' ]:addScoreboardColumn ( 'Arrests' ) addEventHandler("onPlayeDamage",root,function (attacker, weapon) -- local weap = getWeaponNameFromId(weapon) --this would return the name not the id local skin = getElementModel ( attacker ) local team = getTeamFromName( getPlayerTeam ( attacker ) ) local wl = getPlayerWantedLevel ( source ) if (skin == 280 ) and ( team == "Police" ) and ( wl > 0 ) and ( weapon == 3 ) then addPlayerArrests(attacker) end end) function addPlayerArrests(attacker) local account = getPlayerAccount(attacker) if isGuestAccount(account) then return end local arrests = getAccountData(account,"Arrests") or 0 setAccountData(account,"Arrests",tonumber(arrests)+1) setElementData(attacker,"Arrests",tonumber(arrests)+1) end addEventHandler("onPlayerLogin",root,function(_,account) --get the players account if isGuestAccount(account) then return end local arrests = getAccountData(account,"Arrests") or 0 --if there's no arrests data then return 0 setElementData(source,"Arrests",tostring(arrests)) end) EDITTED!!!
-
type in 'start mapmanager' in the console.
-
try this: function registerHandler(player, username, password) local account = getAccount(username, password) if account then triggerClientEvent(player, "registerTaken", getRootElement()) else account = addAccount (username, password) --replace the account var with this if logIn(player, account, password) then triggerClientEvent(player, "hideLoginWindow", getRootElement()) showChat( source, true) setTimer ( fadeCamera, 50, 1, source,false, 1 ) exports["Evo-notificaciones"]:showBox ( source, "warning", "Bienvenido Al Server Su No Apareses Reconnecta /reconnect Y Si Apareses En Un Edificio Tirate Y Lee F1 Esperamos Que Tengas Una Buena Convivencia Con El Server." ) setTimer ( fadeCamera, 1000, 1, source,true, 3 ) setTimer( spawnPlayer, 1600,1,source, 1682.6030273438, -2327.3889160156, 13.546875) setTimer(setCameraMatrix,1500,1,source, 808,-1351,-0.4,-1000,0,0,0,0) setTimer(setElementRotation,2251,1,source,0,0,220) end end end
-
lol, I meant the url not the page contents, anyways, Here's the url to the PasteBin url i made: http://pastebin.com/DurZLbzb
-
ok, you can open the map in map-editor, but you can't find it in your 'resources' folder. After the map is saved, the map resource is automatically created in your 'resources' folder, unless there's a [map] folder, then it would be saved in there. If you can't find your map in there then the map editor automatically creates a backup called 'editordump' or 'editortest'. You could copy the folder and rename it and edit it in the same folder then start it in the server. If none of this worked then try starting map-editor and load the map then type in '/debugscript 3' or 'debugscript 3' in the console and post a screenshot here for us to look at.