-
Posts
521 -
Joined
-
Last visited
Everything posted by Axel
-
Copy it again and paste it..
-
Try now: function see() local players = getElementsByType ( "player" ) for k,v in ipairs(players) do local seemark = getElementData(v,"seemark") if seemark == "true" then -- If the element data is true return v else return false end end end function consoleCreateMarker ( thePlayer, commandName ) if ( thePlayer ) then local x, y, z = getElementPosition ( thePlayer ) setElementData(thePlayer,"seemark","true") -- set it true local theMarker = createMarker ( x + 2, y + 2, z, "cylinder", 1.5, 255, 255, 0, 170,see) end end addCommandHandler ( "createmarker", consoleCreateMarker )
-
Boo, that will only show Hunter (at least this does in my local..) Anyways i fixed it: addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() exports [ "scoreboard" ]:addScoreboardColumn ( "Vehicle:", 3 ) end ) setTimer ( function ( ) local players = getElementsByType "player" for k, v in ipairs ( players ) do if ( isPedInVehicle(v) ) then local vehicle = getPedOccupiedVehicle(v) local carname = getVehicleName(vehicle) setElementData ( v, "Vehicle:", tostring(carname) ) -- The element data must be exactly the same as the scoreboard column else setElementData ( v, "Vehicle:", "On foot") end end end, 2500, 0 ) (tested)
-
Did u add it serverside? It works fine for me..
-
Maybe this: exports [ "scoreboard" ]:addScoreboardColumn ( "Vehicle:", 3 ) setTimer ( function ( ) for index, vehicle in ipairs ( getElementsByType "vehicle" ) do setElementData ( vehicle, "vehicle", getVehicleName ( vehicle ) ) end end, 2500, 0 )
-
No, you must use: exports.customblips:createCustomBlip ( x, y, sizex, sizey, "icon.png" ) , in your exemple : exports.customblips:createCustomBlip ( 193.248, 1890.01, 20, 20, "icon.png" ) Note: the customblips ressource must be started before the script that contains this.
-
I fixed it for you and added some help: function see() local players = getElementsByType ( "player" ) for k,v in ipairs(players) do local seemark = getElementData(v,"seemark") if seemark == true then -- If the element data is true return v else return false end end end function consoleCreateMarker ( thePlayer, commandName ) if ( thePlayer ) then local x, y, z = getElementPosition ( thePlayer ) setElementData(thePlayer,"seemark","true") -- set it true local theMarker = createMarker ( x + 2, y + 2, z, "cylinder", 1.5, 255, 255, 0, 170,see) end end addCommandHandler ( "createmarker", consoleCreateMarker ) (tested)
-
This should work: function noweps ( previousWeaponID, currentWeaponID ) if ( getElementInterior(source) == 0 ) then if (currentWeaponID == 16 or currentWeaponID == 39 or currentWeaponID == 17) then toggleControl ( source, "fire", false ) outputChatBox("Change the weapons you cant use this weapon here.",source,0,255,0) else toggleControl ( source, "fire", true ) end end end addEventHandler ( "onPlayerWeaponSwitch", getRootElement(), noweps ) (tested)
-
The Perfect Roleplay || Scripters Needed (MUST READ)
Axel replied to connorluke's topic in Scripting
I wold like to help. -
I found a small bug in MTA, when u click on a element outside a gui and when u want to click on the gui again you can't. It stucks you with the gui in the face and you can't click on anything.. Is there a way to fix this? If so i wold be glad to see a exemple
-
Is there a way to show an image when someone downloads the server files?
-
Baza scripturilor e valhala, apoi am continuat cu modificari. App: Valhala nu au sistem de ganguri..
-
What's wrong in this insert... local r1,g1,b1,a1 = 0,0,0,100 local query = mysql:query_free("INSERT INTO turfs SET color1=" .. mysql:escape_string(r1) .. ", color2=" .. mysql:escape_string(g1) .. ", color3=" .. mysql:escape_string(b1) .. ", alpha=" .. mysql:escape_string(a1) .. " ") if (query) then setRadarAreaColor(turf,0,0,0,100) setRadarAreaFlashing(turf,false) outputChatBox("Ai castigat teritoriul Dragonilor rosii!",thePlayer,255,100,0) else outputChatBox("Eroare 20000, raporteaza pe forum!",thePlayer,255,100,0) end end,20000,1)
-
No.. you understood me wrong, the script i posted takes data from sql and creates the turfs and colshapes, i want to use onColShapeHit on the colshape... but that does'nt work..
-
So i'm new to MySql, i know just some basics. I'l post here some questions. First of all: addEventHandler( "onResourceStart", getResourceRootElement( ), function( ) local result = mysql:query("SELECT gangs, teren, color1, color2, color3, alpha, x, y, sizex, sizey FROM turfs") if (result) then local continue = true while continue do row = mysql:fetch_assoc(result) if not (row) then break end local gangs = tonumber(row["gangs"]) local teren = tostring(row["teren"]) local color1 = tonumber(row["color1"]) local color2 = tonumber(row["color2"]) local color3 = tonumber(row["color3"]) local alpha = tonumber(row["alpha"]) local x = tonumber(row["x"]) local y = tonumber(row["y"]) local sizex = tonumber(row["sizex"]) local sizey = tonumber(row["sizey"]) local shape = createColRectangle(x, y, sizex, sizey) local turf = createRadarArea(x,y,sizex,sizey,color1,color2,color3,alpha) end mysql:free_result(result) end end ) This loads from MySql data about turfs, and creates them. All fine, but my question: How do i use it in another script? Like i want onColShapeHit on the shape but nothing works..
-
You didn't search the comunity? You can find there: https://community.multitheftauto.com/index.php?p=resources&s=details&id=2484 J-Jobs with Police script too (advice: start interiors then go in lspd for the job..)
-
Romania Viata Reala Forum: vR-RP.ro Conectare: mtasa://91.134.232.59:22003 Istoria Deci era o zii de vara(vara trecuta), si ma jucam pe serverele de atunci de RPG si RolePlay, si am cautat servere romanesti, nimic niciodata. Dupa ce am verificat si SAMP in care sunt o gramada de romani (sa zicem peste 300) am vazut ca diferenta intre SAMP si MTA e colosala.. MTA e cam de 5 ori mai tare in features. Si m-am gandit, de ce sa nu ma apuc eu de un server romanesc in totalitate in romana si sa aduc jucatorii din SAMP sa le arat ca MTA este mult mai tare. Practic mi-am pus telul: "Sa aduc cati mai multi romani de pe SAMP pe MTA". Si au inceput lucrarile, am inceput sa invat scripting, am inceput cu scripturi mici si le-am dezvoltat pana au iesit mari.. Ca sa scurtam povestea developarea a mers bine, am gasit un host NonStop si serverul continua si astazi. Features Pai serverul este pe gamemodul "Realism", un gamemod practic devevelopat pe mine, care are ca tel sa imite cat mai mult realitatea. Jucatorii sunt practic introdusi intr-o noua lume fictionala. Incepand de la crearea caracterului: sistem de slujbe sistem de obiecte avansat sistem de factiuni precum politie/spital etc sistem e interioare, case, afaceri, locuinte de inchiriat sistem de cumparat si inchiriat masini chear si tunarea masinilor, daca esti mecanic..
-
On esc>settings>interface>General Skin.. how to force players use another skin...
-
Is there a way to force a gui appearance from settings onPlayerJoin or onRessourceStart?
-
Is there a way to make the mods size smaller? I saw on a server alot of modified cars and no big download..
-
Can't it be used with bone_attach ressource?
-
This should work.. function cancel ( attacker, weapon, bodypart, loss ) if ( weapon == 41 ) then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", getlocalPlayer(), cancel ) Edited.
-
When i wanted to download this: https://community.multitheftauto.com/index.php?p= ... ls&id=1819 a message appeared: Download Error The requested file does not exist. Please contact an admin. So here i am..