-
Posts
521 -
Joined
-
Last visited
Everything posted by Axel
-
Wich it's better? Is there a chance if i use XML to make lag?
-
And if i want to make more turfs for teams?
-
U know a way to save it?Also there were meant to be radar and radar2
-
So i made this crappy turfs system: ingeriimortii=createRadarArea( 1165, -933,400,200,0,0,255,50) dragoniirosi=createRadarArea( 2611, -2053,200,160,255,0,0,50) dcol = createColRectangle ( 2611, -2053, 200, 160 ) icol = createColRectangle ( 1165, -933,400,200 ) function radar (source) setRadarAreaColor ( dragoniirosi, 0,0,255, 50 ) setRadarAreaFlashing ( dragoniirosi, false ) exports.global:giveMoney(source, 5) end function radar2 (source) setRadarAreaFlashing ( dragoniirosi, false ) setRadarAreaColor ( dragoniirosi, 255,0,0, 50 ) exports.global:giveMoney(source, 5) end function enter( source ) if getPlayerTeam(source) == getTeamFromName("Dragonii Rosii") then outputChatBox("Bine ai revenit Membru al Dragoniilor Rosii!",source,255,0,0) setRadarAreaFlashing ( dragoniirosi, true ) setTimer ( radar2, 5000, 5000) elseif getPlayerTeam(source) == getTeamFromName("Ingerii Mortii") then outputChatBox("Ai atacat teritoriul Dragoniilor Rosii!",source,255,0,0) setTimer ( radar, 5000, 5000) setRadarAreaFlashing ( dragoniirosi, true ) else outputChatBox("Ai intrat pe teriroruil unu-i gang ai grija sa nu fi atacat!",source,255,0,0) end end addEventHandler ( "onColShapeHit", dcol, enter ) function enter2( source ) if getPlayerTeam(source) == getTeamFromName("Ingerii Mortii") then outputChatBox("Bine ai revenit Membru al Ingerii Mortii!",source,0,0,255) setRadarAreaFlashing ( ingeriimortii, false ) setTimer ( radar4, 5000, 5000) elseif getPlayerTeam(source) == getTeamFromName("Dragonii Rosii") then outputChatBox("Ai atacat teritoriul Ingerilor Mortii!",source,0,0,255) setTimer ( radar5, 5000, 5000) setRadarAreaFlashing ( ingeriimortii, true ) else outputChatBox("Ai intrat pe teriroruil unu-i gang ai grija sa nu fi atacat!",source,255,0,0) end end addEventHandler ( "onColShapeHit", icol, enter2 ) I need some help in better way of creating turfs, a way to check if the player is inside it and if he exits the attacking stops.. and maybe some advice how to make it better
-
Ei bine pana la urma am facut primul server romanesc, si prima comunitate de romani de pe MTA. Cateva imagini 16 Romani online, e ceva:D Poza de grup Sistem de ganguri /Facut in intregime de mine.. Belele.. Bine ai venit in Romania RolePlay Sistem de obiecte, peste 300 Sistem de masini, cumparare/inchiriere Sistem de Slujbe:D Si multe multe altele. Serverul se numeste Romania RolePlay Deoarece eu il hostez va fii deschis de la 12 ziua pana la 12 noaptea in fiecare zii. Daca voi gasii host va fii 24/7 (Caut un host gratis..)
-
So i'm trying to make the server for a friend, the ports are all set up, but when i start the server it says that it;s still closed. Does someone got a clue about this?
-
Can onColShapeHit be used for a radar area?
-
How can i replace the crosshair with another one?
-
I'v noticed that there is no ressource that brings info in-game except the one on the F1 so i decided to make a infopickups ressource. The code is very simple thought i added some help for new scripters. What it does? Well it's easy: When u hit a pickup you get a message. The pickup respawns after 1 minute. As u might see it also clears the chat for other messages. Image: Download: https://community.multitheftauto.com/index.php?p=resources&s=details&id=3849 Code: --[[ Info Pickups - Made by Axel aka Serbanescu Gabriel Contact: Skype: freestyleaxel If your kind, don't delete this Copyright ]] infopickups = { -- {x, y, z, interior, dimension, "text", color1, color2, color3}, {1542.37720, -1682.36157, 13.55438, 0, 0, "TEST PICKUP 1 DUDE!", 0, 255, 255}, {1548, -1681, 13, 0, 0, "TEST PICKUP2 DUDE!. ", 0, 255, 255}, } addEventHandler("onResourceStart",getRootElement(), function () -- when the ressource start for index, value in pairs(infopickups) do -- loop throught that table local x, y, z, interior, dimension, text, color1, color2, color3 = value[1], value[2], value[3], value[4], value[5], value[6], value[7], value[8], value[9] -- take the data we need local pickup = createPickup(x, y, z, 3, 1239, 0) -- create the pickup createBlipAttachedTo(pickup,2,1, 255, 255, 0, 255, 0, 1) -- attach some blip to see where it is setElementInterior(pickup, interior) setElementDimension(pickup, dimension) setElementData(pickup, "text", text) -- set the text setElementData(pickup,"color1",color1) -- set the color 1 setElementData(pickup,"color2",color2) -- set the color 2 setElementData(pickup,"color3",color3) -- set the color 3 setElementData(pickup, "isItInfoPickup", 1) -- Set's if it is really a pickup.. we don't want other pickups to show messages right? end outputDebugString ( "Info Pickups - Made By Axel." ) -- You won't delete it, right? end ) function matchDimensionInterior(object1, object2) -- This function checks if 2 objects are in the same interior and dimension if (object1) and (object2) then local interior1 = getElementInterior(object1) local interior2 = getElementInterior(object2) local dimension1 = getElementDimension(object1) local dimension2 = getElementDimension(object2) if (interior1 == interior2) and (dimension1 == dimension2) then return true end end end function outputSpace(thePlayer) -- This function outputs some space in the Chat Box outputChatBox(" ",thePlayer) outputChatBox(" ",thePlayer) outputChatBox(" ",thePlayer) outputChatBox(" ",thePlayer) end addEventHandler("onPickupHit",getRootElement(), function (thePlayer) if (matchDimensionInterior(thePlayer, source)) then -- if the pickup and the player are in the same dimension, so you can make in different dimensions if (getElementData(source,"isItInfoPickup") == 1) then -- if the pickup it's really a pickup local text = getElementData(source,"text") local color1 = getElementData(source,"color1") local color2 = getElementData(source,"color2") local color3 = getElementData(source,"color3") outputSpace(thePlayer) outputChatBox("````````````````````````````````````Info````````````````````````````````````",thePlayer,color1,color2,color3) outputChatBox(text,thePlayer,color1,color2,color3) outputChatBox("`````````````````````````````````````````````````````````````````````````````",thePlayer,color1,color2,color3) outputSpace(thePlayer) end cancelEvent() end end ) Also, you can check my parking system: http://adf.ly/f6cwQ
-
As far as i'v noticed it might be here: function createMainUI(res, isChangeAccount) if (res==getThisResource()) then sent = false local tutFile = xmlLoadFile("vgrptut.xml") local regFile = xmlLoadFile("vgrpreg.xml") if (tutFile) or (regFile) then -- Set the camera to a nice view local cameraRand = math.random(1, 1) if (cameraRand==1) then loadScenarioOne() addEventHandler("onClientRender", getRootElement(), renderWelcomeMessage) end fadeCamera(false) if (bChangeAccount) then destroyElement(bChangeAccount) bChangeAccount = nil end checkTOS() -- Terms of Service local width, height = 400, 200 local scrWidth, scrHeight = guiGetScreenSize() local x = scrWidth/2 - (width/2) local y = scrHeight/2 - (height/2) if (scrWidth<1024) and (scrHeight<768) then outputChatBox("WARNING: You are running on a low resolution. We recommend atleast 1024x768.", 255, 0, 0) end --[[ local version = tonumber(string.sub(getVersion().type, 10, string.len(getVersion().type))) if (getVersion().type~="Custom" and getVersion().type~="Release") and sversion then if (version~=nil) then if (version clearChatBox() showChat(true) outputChatBox("You are using an older nightly. You require r" .. sversion .. ".") outputChatBox("You can obtain this at [url=https://nightly.multitheftauto.com]https://nightly.multitheftauto.com[/url]") return end end end ]]-- tabPanelMain = guiCreateTabPanel(x, y, width, height, false) if (regFile) then -- User has already registered on this PC before. tabLogin = guiCreateTab("Login to Account", tabPanelMain) tabRegister = guiCreateTab("Register Account", tabPanelMain) tabForgot = guiCreateTab("Forgot Details", tabPanelMain) else tabRegister = guiCreateTab("Register Account", tabPanelMain) tabLogin = guiCreateTab("Login to Account", tabPanelMain) tabForgot = guiCreateTab("Forgot Details", tabPanelMain) end guiSetAlpha(tabPanelMain, 0) lRegUsername = guiCreateLabel(0.025, 0.15, 0.95, 0.95, "To join this server you must submit an application at: \n\n\n[url=http://www.ValhallaGaming.net/mtaucp]www.ValhallaGaming.net/mtaucp[/url].\n\n\n We aim to respond to all applications within a few hours. \n\n This helps us pick out undesirable players such as Deathmatchers.", true, tabRegister) lRegUsernameNote = guiCreateLabel(0.225, 0.25, 0.8, 0.2, "NOTE: This is NOT your character's name.", true, tabRegister) guiLabelSetHorizontalAlign(lRegUsername, "center") guiSetFont(lRegUsername, "default-bold-small") lRegUsername = guiCreateLabel(0.2, 0.15, 0.3, 0.1, "Account Name:", true, tabRegister) lRegUsernameNote = guiCreateLabel(0.225, 0.25, 0.8, 0.2, "NOTE: This is NOT your character's name.", true, tabRegister) guiSetFont(lRegUsernameNote, "default-bold-small") tRegUsername = guiCreateEdit(0.425, 0.15, 0.3, 0.1, "Memorable Name", true, tabRegister) guiEditSetMaxLength(tRegUsername, 16) lRegPassword = guiCreateLabel(0.15, 0.45, 0.3, 0.1, "Account Password:", true, tabRegister) tRegPassword = guiCreateEdit(0.425, 0.45, 0.3, 0.1, "password", true, tabRegister) guiEditSetMasked(tRegPassword, true) guiEditSetMaxLength(tRegPassword, 29) lRegPassword2 = guiCreateLabel(0.165, 0.575, 0.3, 0.1, "Confirm Password:", true, tabRegister) tRegPassword2 = guiCreateEdit(0.425, 0.575, 0.3, 0.1, "password", true, tabRegister) guiEditSetMasked(tRegPassword2, true) guiEditSetMaxLength(tRegPassword2, 29) bRegister = guiCreateButton(0.25, 0.75, 0.5, 0.2, "Register", true, tabRegister) addEventHandler("onClientGUIClick", bRegister, validateDetails, false) -- LOGIN lLogUsername = guiCreateLabel(0.2, 0.2, 0.3, 0.1, "Account Name:", true, tabLogin) lLogUsernameNote = guiCreateLabel(0.225, 0.3, 0.8, 0.2, "NOTE: This is NOT your character's name.", true, tabLogin) guiSetFont(lLogUsernameNote, "default-bold-small") tLogUsername = guiCreateEdit(0.425, 0.2, 0.3, 0.1, "", true, tabLogin) guiEditSetMaxLength(tLogUsername, 32) lLogPassword = guiCreateLabel(0.15, 0.45, 0.3, 0.1, "Account Password:", true, tabLogin) tLogPassword = guiCreateEdit(0.425, 0.45, 0.3, 0.1, "", true, tabLogin) guiEditSetMasked(tLogPassword, true) guiEditSetMaxLength(tLogPassword, 32) chkRemember = guiCreateCheckBox(0.35, 0.52, 0.5, 0.15, "Remember my Details", false, true, tabLogin) chkAutoLogin = guiCreateCheckBox(0.35, 0.62, 0.5, 0.15, "Automatic Login", false, true, tabLogin) addEventHandler("onClientGUIClick", chkRemember, updateLoginState) bLogin = guiCreateButton(0.25, 0.75, 0.5, 0.2, "Login", true, tabLogin) addEventHandler("onClientGUIClick", bLogin, validateDetails, false) -- FORGOTTEN DETAILS lLostSecurityKey = guiCreateLabel(0.025, 0.15, 0.95, 0.95, "To retrieve your username and password please visit the UCP: \n\n\n[url=http://www.ValhallaGaming.net/mtaucp]www.ValhallaGaming.net/mtaucp[/url]., true, tabForgot) guiLabelSetHorizontalAlign(lLostSecurityKey, "center") guiSetFont(lLostSecurityKey, "default-bold-small") -- LOAD SAVED USER INFO local xmlRoot = xmlLoadFile( ip == "127.0.0.1" and "vgloginlocal.xml" or "vglogin.xml" ) if (xmlRoot) then local usernameNode = xmlFindChild(xmlRoot, "username", 0) local passwordNode = xmlFindChild(xmlRoot, "hashcode", 0) local autologinNode = xmlFindChild(xmlRoot, "autologin", 0) if (usernameNode) then uname = xmlNodeGetValue(usernameNode) if (uname) and (uname~="") then guiSetText(tLogUsername, tostring(uname)) guiCheckBoxSetSelected(chkRemember, true) if (passwordNode) then local pword = xmlNodeGetValue(passwordNode) if (pword) and (pword~="") then guiSetText(tLogPassword, tostring(pword)) guiCheckBoxSetSelected(chkRemember, true) else guiSetEnabled(chkAutoLogin, false) end if (autologinNode) then local autolog = xmlNodeGetValue(autologinNode) if (autolog) and (autolog=="1") then if(guiGetEnabled(chkAutoLogin)) then guiCheckBoxSetSelected(chkAutoLogin, true) if not (isChangeAccount) then triggerServerEvent("attemptLogin", getLocalPlayer(), guiGetText(tLogUsername), guiGetText(tLogPassword), nil, true) end end end end else guiCheckBoxSetSelected(chkAutoLogin, false) end end end end if (toswindow) then guiBringToFront(toswindow) end setTimer(fadeWindow, 50, 20) else showChat(true) showTutorial() end end end --addEventHandler("onClientResourceStart", getRootElement(), createMainUI)
-
Well i noticed that in vg account-system, when i login with my account the screen gets black.. i think it's something with the fadeCamera , can someone give me an advice or something?
-
Uite un exemplu: local skin = engineLoadTXD ( "numeleskinului.txd" ) engineImportTXD ( skin, 114 )
-
You will need WampServer(this is what i use) or XAMMP to oen localhost server...
-
It worked before, so isn't that...
-
So till today my server worked perfectly, players could join, play, etc. Today when i tryed it, players couldn't connect. I tested the ports and: Port 22126 UDP is closed.Players cannot browse! Port 22003 UDP is closed.Players cannot join! Port 22005 TCP is closed.Players cannot browse! Some ideas/suggestions what it can be?
-
Well i found a problem, when someone changes his skin, he looses all his weapons
-
It worked just fine.Thank you very much, it is very usefull!
-
Well.. that didn't work in mta paradise respawn..
-
Is there a way to cancel the removing of weapons when u use spawnPlayer ? Or is there a way u can keep the weapons when u respawn? Thanks for help
-
Aici gresesti, as fii interesat si de race.. dar mta-ul este suprapopulat de servere de race.. Pe deasupra in RolePlay putem baga si Race, eventuri.. Daca te gandesti bine in MTA putem scripta tot ce este deja in SAMP ba chear mai multe datorita facilitati de a putea folosi GUI..