illestiraqi
Members-
Posts
256 -
Joined
-
Last visited
Everything posted by illestiraqi
-
In my server the skin Staff Boy and Staff Girl is for everyone, I need a script that will make skin id 211, 217 restricted to users in the Admin acl team and Super Moderators please.
-
CreateMarker() https://wiki.multitheftauto.com/wiki/CreateMarker I don't know how to do it can you give me the script and ill just add the posx, y, and z?
-
I got 2 markers in my Map Editor, is there a way I can eaither script them to link please help?
-
Everytime in the Map file there are vehicles. it always doubles and all vehicles blow up. Why?
-
Everytime I script my vehicle double, so when I go to my base all the map's vehicles always double and explode please help.
-
This is the Area 51, The front small tiny entrance place, I added a gate and then the gate to the garage doesent move and than 5 seconds later the gate at the front small tiny entrance apears and the other garage gates are fked. Please Fix. This is the gate at the front, where the tiny entrance is. gate1= createObject ( 1553, 97, 1920.5, 20.10000038147, 0, 0, 90 ) gate2 = createObject ( 1553, 96.900001525879, 1920.5, 18.299999237061, 0, 0, 90 ) gatecol = createColCircle ( 97.089881896973, 1920.7144775391, 19.524454116821, 50 ) function opengates(thePlayer) if ( getTeamName(getPlayerTeam(thePlayer)) == "Army" ) then moveObject (gate1, 5000, 97, 1920.5, 22.60000038147 ) moveObject (gate2, 5000, 96.900001525879, 1920.5, 15.89999961853 ) end end addEventHandler( "onColShapeHit", gatecol, opengates ) function closegates(thePlayer) if ( getTeamName(getPlayerTeam(thePlayer)) == "Army" ) then moveObject (gate1, 1553, 97, 1920.5, 20.10000038147 ) moveObject (gate2, 1553, 96.900001525879, 1920.5, 18.299999237061 ) end end addEventHandler( "onColShapeLeave", gatecol, closegates ) --------------------------------------------------------------------------------------------------------------------------------------------- This is the gate to the Garage gate1= createObject ( 2929, 215.99548339844, 1875.40234375, 13.938992500305, 0, 0, 0 ) gate2 = createObject ( 2929, 211.94564819336, 1875.40234375, 13.938992500305, 0, 0, 0 ) gatecol = createColCircle ( 213.94564819336, 1875.40234375, 13.938992500305, 50 ) function opengates(thePlayer) if ( getTeamName(getPlayerTeam(thePlayer)) == "Army" ) then moveObject (gate1, 5000, 218.99548339844, 1875.40234375, 13.938992500305 ) moveObject (gate2, 5000, 208.94564819336, 1875.40234375, 13.938992500305 ) end end addEventHandler( "onColShapeHit", gatecol, opengates ) function closegates(thePlayer) if ( getTeamName(getPlayerTeam(thePlayer)) == "Army" ) then moveObject (gate1, 5000, 215.99548339844, 1875.40234375, 13.938992500305 ) moveObject (gate2, 5000, 211.94564819336, 1875.40234375, 13.938992500305 ) end end addEventHandler( "onColShapeLeave", gatecol, closegates )
-
In my play gamemode rar file i tried changing the spawnpoint without the name but my client kept getting crashes meaning I failed that. I want to change that to the building beside LSPD that looks like a white house please and thank you. "hill" posX="-2405" posY="-598" posZ="132.6" rotX="128">
-
Apperently it isn't working any reason why? Well actually the marker isn't showing.
-
UPDATE: Let Me Try it
-
tosfera, I tried your's but didn't work. For the others thanks for trying to help me but the truth is I can't script i just tried but it's still not working, I tried changing "C" in cylinder to "c" but didn't work please if you know problem plz re-write the script for me because i don't know how to sorry
-
Apperently from what I know the only thing that works is the blip. The Cylinder Markers doesn't show, the job gui doesent show if i walk on the spot where the cylinder is supposed to be plz fix.!
-
I don't know whats wrong with this script someone please help me fix it! client: local marker = createMarker( 186.30000305176, 1938.3000488281, 16.700000762939, "Cylinder", 2, 0, 40, 0, 150) GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} function guiMyCwindow(w,h,t) local x,y = guiGetScreenSize() return guiCreateWindow((x-w)/2,(y-h)/2,w,h,t,false) end windowjob = guiMyCwindow(301,170,"Armed Soldier") guiSetVisible(windowjob, false) GUIEditor_Button[1] = guiCreateButton(22,80,108,35,"Take job",false,windowjob) GUIEditor_Button[3] = guiCreateButton(22,120,108,35,"Quit Job",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,120,110,36,"Cancel",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(19,33,273,20,"Are you sure you want to take/leave this job?",false,windowjob) function SAPDjob(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, SAPDjob) addEventHandler("onClientMarkerHit", marker1, SAPDjob) addEventHandler("onClientMarkerHit", marker2, SAPDjob) function SAPDjobleave(leaveElement) if getElementType(leaveElement) == "player" and (leaveElement == localPlayer) then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", marker, SAPDjobleave) addEventHandler("onClientMarkerLeave", marker1, SAPDjobleave) addEventHandler("onClientMarkerLeave", marker2, SAPDjobleave) function joinTeam() triggerServerEvent("setSAPD",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeTeam() triggerServerEvent("removeSAPD",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[3] , removeTeam, false) function removeSAPDWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeSAPDWindow, false) server: createBlip ( 1552.4996337891, -1677.3264160156, 15.1953125, 30 ) createBlip ( -1604.5458984375, 712.25848388672, 12.8671875, 30 ) createBlip ( 2340.9245605469, 2456.0463867188, 13.96875, 30 ) function createSAPDTeam () SAPDteam = createTeam ("Army", 0, 70, 0) end addEventHandler ("onResourceStart", resourceRoot, createSAPDTeam) function joinSAPD() setPlayerTeam(source,SAPDteam) setElementModel(source, 287) giveWeapon ( source, 3 ) playeraccount = getPlayerAccount( source ) setAccountData( playeraccount, "team", "police", true ) outputChatBox("You are now an Armed Soldier!",source,0,70,0) end addEvent("setSAPD", true) addEventHandler("setSAPD",root,joinSAPD) function removeSAPD() setPlayerTeam(source, 0) takeWeapon(source, 3) playeraccount = getPlayerAccount(source) if getAccountData(playeraccount, "standardskin") == 0 then setElementModel(source, 0) else setElementModel(source,getAccountData(playeraccount,"standardskin")) end outputChatBox("You are now an unemployed.",source,255,0,0) end addEvent("removeSAPD", true) addEventHandler("removeSAPD",root,removeSAPD)
-
I want everything else. just remove the stars and jailing thing in this, I dont know how to remove it or else I'll mess it up please help. createBlip ( 1552.4996337891, -1677.3264160156, 15.1953125, 30 ) createBlip ( -1604.5458984375, 712.25848388672, 12.8671875, 30 ) createBlip ( 2340.9245605469, 2456.0463867188, 13.96875, 30 ) function createSAPDTeam () SAPDteam = createTeam ("Army", 100, 149, 237) end addEventHandler ("onResourceStart", resourceRoot, createSAPDTeam) function joinSAPD() setPlayerTeam(source,SAPDteam) setElementModel(source, 280) giveWeapon ( source, 3 ) playeraccount = getPlayerAccount( source ) setAccountData( playeraccount, "team", "police", true ) outputChatBox("You are now SAPD agent.",source,0,255,0) end addEvent("setSAPD", true) addEventHandler("setSAPD",root,joinSAPD) function removeSAPD() setPlayerTeam(source, 0) takeWeapon(source, 3) playeraccount = getPlayerAccount(source) if getAccountData(playeraccount, "standardskin") == 0 then setElementModel(source, 0) else setElementModel(source,getAccountData(playeraccount,"standardskin")) end outputChatBox("You are now an unemployed.",source,255,0,0) end addEvent("removeSAPD", true) addEventHandler("removeSAPD",root,removeSAPD) function policeJob ( attacker, attackerweapon, bodypart, loss ) if attacker and getElementType(attacker) == "player" then theTeam = getPlayerTeam ( attacker ) theWL = getPlayerWantedLevel ( source ) theSkin = getElementModel ( attacker ) if (attackerweapon == 3) and (loss > 2 ) and (theWL > 0) then if getTeamName( theTeam ) == "police" or getTeamName( theTeam ) == "SWAT" or getTeamName( theTeam ) == "FBI" then setElementPosition (source, 4076.3999023438, -1788.5, 3.511967, true) theName = getPlayerName ( source ) theCop = getPlayerName ( attacker ) outputChatBox ( "You have been jailed by "..theCop.. " for 10 seconds.", source ) local playeraccount = getPlayerAccount ( attacker ) givePlayerMoney (attacker, 100) setTimer ( setElementPosition, 10000, 1, source, 1544.4332275391, -1674.7698974609, 13.688399200439) setPlayerWantedLevel (source, 0) end end end end addEventHandler ("onPlayerDamage", getRootElement(), policeJob)
-
is this server or client side?
-
I want a simple script to automatically create teams when server is loaded without having to create them. I want to create Team "Army" with colors 0, 70, 0 please if someone can help.
-
resource comes with shops.map, and I think it means put all the markers infront of the clothing stores and i dont know how so I need help Please! Shows Error: meta "Socialz" name="Basic Roleplay | Shops" type="script"> -- Scripts --> -- Files --> "shops.map"> s_shops --[[ Basic Roleplay Gamemode ~ Server-side functions for shops Created by Socialz ]]-- --[[ Notes: Hey there. All items haven't been done yet, so you can do them yourself or wait for the next patch to come up. Only shops that work well are: Cafe, Gun Store, Restaurant, Clothing -Socialz 04/06/2012 11:34:00 GMT +02 ]]-- -- Miniatures local cRoot = getRootElement() local cThis = getThisResource() local cThisRoot = getResourceRootElement(cThis) -- Configurations (modifyable) -- Remember to edit in the client-side script as well local types = { -- ID : Shop name [1] = {"Cafe"}, [2] = {"General Store"}, [3] = {"Gun Store"}, [4] = {"Restaurant"}, [5] = {"Burgershot"}, [6] = {"Pizza Stack Co."}, [7] = {"Cluckin' Bell"}, [8] = {"Electronics"}, [9] = {"Clothing"} } -- Functions local addCommandHandler_ = addCommandHandler addCommandHandler = function(commandName, fn, restricted, caseSensitive) if type(commandName) ~= "table" then commandName = {commandName} end for key, value in ipairs(commandName) do if key == 1 then addCommandHandler_(value, fn, restricted, caseSensitive) else addCommandHandler_(value, function(player, ...) fn(player, ...) end ) end end end addCommandHandler({"makeshop", "createshop"}, function(player, cmd, type, skin) if exports.brpExports:isPlayerAdmin(player) then local type = tonumber(type) if type then if types[type] then local skin = tonumber(skin) local x, y, z = getElementPosition(player) local rot = getPedRotation(player) if skin then local xml = xmlLoadFile("shops.map") local new = xmlCreateChild(xml, "shop") local id = math.random(1,99999) local interior = getElementInterior(player) local dimension = getElementDimension(player) local ped = createPed(skin, x, y, z, rot) setElementInterior(ped, interior) setElementDimension(ped, dimension) setElementFrozen(ped, true) xmlNodeSetAttribute(new, "id", tonumber(id)) xmlNodeSetAttribute(new, "posx", tonumber(x)) xmlNodeSetAttribute(new, "posy", tonumber(y)) xmlNodeSetAttribute(new, "posz", tonumber(z)) xmlNodeSetAttribute(new, "rotation", tonumber(rot)) xmlNodeSetAttribute(new, "interior", tonumber(interior)) xmlNodeSetAttribute(new, "dimension", tonumber(dimension)) xmlNodeSetAttribute(new, "skin", tonumber(skin)) xmlNodeSetAttribute(new, "type", type) xmlSaveFile(xml) xmlUnloadFile(xml) setElementData(ped, "shops.id", id) setElementData(ped, "shops.type", type) local marker = createMarker(x, y, z - 1, "cylinder", 5, 255, 0, 0, 70) setElementInterior(marker, interior) setElementDimension(marker, dimension) setElementData(marker, "shops.id", id) setElementData(marker, "shops.type", type) outputChatBox("Shop created (" .. id .. ").", player, 0, 255, 0, false) else local xml = xmlLoadFile("shops.map") local new = xmlCreateChild(xml, "shop") local id = math.random(1,99999) local skin = math.random(10,15) local interior = getElementInterior(player) local dimension = getElementDimension(player) local ped = createPed(skin, x, y, z, rot) setElementInterior(ped, interior) setElementDimension(ped, dimension) setElementFrozen(ped, true) xmlNodeSetAttribute(new, "id", tonumber(id)) xmlNodeSetAttribute(new, "posx", tonumber(x)) xmlNodeSetAttribute(new, "posy", tonumber(y)) xmlNodeSetAttribute(new, "posz", tonumber(z)) xmlNodeSetAttribute(new, "rotation", tonumber(rot)) xmlNodeSetAttribute(new, "interior", tonumber(interior)) xmlNodeSetAttribute(new, "dimension", tonumber(dimension)) xmlNodeSetAttribute(new, "skin", tonumber(skin)) xmlNodeSetAttribute(new, "type", type) xmlSaveFile(xml) xmlUnloadFile(xml) setElementData(ped, "shops.id", id) setElementData(ped, "shops.type", type) local marker = createMarker(x, y, z - 1, "cylinder", 5, 255, 0, 0, 70) setElementInterior(marker, interior) setElementDimension(marker, dimension) setElementData(marker, "shops.id", id) setElementData(marker, "shops.type", type) outputChatBox("Shop created (" .. id .. ").", player, 0, 255, 0, false) end else outputChatBox("Invalid shop type entered.", player, 255, 0, 0, false) end else outputChatBox("Syntax: /" .. cmd .. " []", player, 220, 220, 0, false) outputChatBox("Types:", player) for i,v in ipairs(types) do outputChatBox(" " .. i .. " = " .. types[i][1], player, 220, 220, 0, false) end end end end ) addCommandHandler("deleteshop", function(player, cmd, id) if exports.brpExports:isPlayerAdmin(player) then local id = tonumber(id) if id then for index,shop in ipairs(getElementsByType("shop")) do for i,v in ipairs(getElementsByType("ped")) do if tonumber(getElementData(shop, "id")) == tonumber(getElementData(v, "shops.id")) then local xml = xmlLoadFile("shops.map") local new = xmlFindChild(xml, "shop", 0) xmlNodeSetName(new, "deleted") xmlNodeSetAttribute(new, "deletedby", getPlayerName(player)) xmlSaveFile(xml) xmlUnloadFile(xml) for k,m in ipairs(getElementsByType("marker")) do if tonumber(getElementData(m, "shops.id")) == tonumber(getElementData(v, "shops.id")) then destroyElement(m) end end destroyElement(v) outputChatBox("Shop deleted.", player, 0, 255, 0, false) break end end end else outputChatBox("Syntax: /" .. cmd .. " ", player, 220, 220, 0, false) end end end ) -- Do not change this integer local shops = 0 addCommandHandler("nearbyshops", function(player, cmd) if exports.brpExports:isPlayerAdmin(player) then outputChatBox("Nearby shops:", player) for i,v in ipairs(getElementsByType("ped")) do if getElementData(v, "shops.id") then local x, y, z = getElementPosition(player) if exports.brpExports:isElementInRangeOfPoint(v, x, y, z, 15) then outputChatBox(" [" .. getElementData(v, "shops.id") .. "] " .. types[tonumber(getElementData(v, "shops.type"))][1], player, 220, 220, 0, false) shops = 1 end end end if shops == 0 then outputChatBox(" No shops nearby.", player, 255, 0, 0, false) else shops = 0 end end end ) addEvent("onItemBuy", true) addEventHandler("onItemBuy", root, function(item, price) outputServerLog("[sHOPS] [PLA/BUY]: " .. getPlayerName(source) .. " bought '" .. item .. "' for $" .. price .. ".") takePlayerMoney(source, price) end ) addEvent("onWeaponBuy", true) addEventHandler("onWeaponBuy", root, function(weapon, ammo) giveWeapon(source, weapon, ammo, true) outputServerLog("[sHOPS] [PLA/BUYINFO]: Additional information: [Weapon ID: " .. weapon .. "] [Ammo Amount: " .. ammo .. "].") end ) addEventHandler("onMarkerHit", root, function(hitElement, matchingDimension) if getElementType(hitElement) == "player" then if matchingDimension then if getElementData(source, "shops.id") then setElementData(hitElement, "shops.in", getElementData(source, "shops.id")) end end end end ) addEventHandler("onMarkerLeave", root, function(hitElement, matchingDimension) if getElementType(hitElement) == "player" then if matchingDimension then if getElementData(source, "shops.id") then removeElementData(hitElement, "shops.in") end end end end ) addEventHandler("onResourceStart", resourceRoot, function() for i,v in ipairs(getElementsByType("shop")) do local ped = createPed(getElementData(v, "skin"), getElementData(v, "posx"), getElementData(v, "posy"), getElementData(v, "posz"), getElementData(v, "rotation")) setElementInterior(ped, getElementData(v, "interior")) setElementDimension(ped, getElementData(v, "dimension")) setElementFrozen(ped, true) setElementData(ped, "shops.id", getElementData(v, "id")) setElementData(ped, "shops.type", getElementData(v, "type")) local marker = createMarker(getElementData(v, "posx"), getElementData(v, "posy"), getElementData(v, "posz") - 1, "cylinder", 5, 255, 0, 0, 70) setElementInterior(marker, getElementData(v, "interior")) setElementDimension(marker, getElementData(v, "dimension")) setElementData(marker, "shops.id", getElementData(v, "id"))
-
Apperentley it didn't work
-
please change it up idk how
-
I need help changing this script below.... to make it open for ACL group name "Console" function createThelift () mylift = createObject ( 3095, -2027.8459, 157.1302, 82.555, 0, 0, 0 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createThelift ) function openMylift () moveObject ( mylift, 8000, -2027.8459, 157.1302, 32.1, 0, 0, 0 ) end addCommandHandler("liftdown",openMylift) function movingMyliftBack () moveObject ( mylift, 8000, -2027.8459, 157.1302, 82.555, 0, 0, 0 ) end addCommandHandler("liftup",movingMyliftBack) function createTheGate1 () myGate1 = createObject ( 980, -2016.75, 176.81, 29.47, 0, 0, 90 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate1 ) function openMyGate1 () moveObject ( myGate1, 3000, -2016.75, 165, 29.47, 0, 0, 0 ) end addCommandHandler("opencorp",openMyGate1) function movingMyGateBack1 () moveObject ( myGate1, 3000, -2016.75, 176.81, 29.47, 0, 0, 0 ) end addCommandHandler("closecorp",movingMyGateBack1)
-
I would like to know if its possible to add a custom vehicle or add a custom skin?
-
So In this script, it's been found, and the bind is to press "l" to drop a weapon but i want it changed to... like in game when they open that chat thing when they press T the say thing comes out i want the command to be /dropwep please! throwWeaponPickup = {} function throwWeapon(thePlayer, key, keyState) if (not isPedInVehicle(thePlayer)) then local theIDweapon = getPedWeapon(thePlayer) local theTotalAmmo = getPedTotalAmmo(thePlayer) if theIDweapon then local x,y,z = getElementPosition(thePlayer) local rot = getPedRotation(thePlayer) x = x + ((math.cos(math.rad(rot + 90))) * 2.5) y = y + ((math.sin(math.rad(rot + 90))) * 2.5) for i,players in ipairs(getElementsByType("player")) do local px,py,pz = getElementPosition(players) if getDistanceBetweenPoints2D(x, y, px,py) < 2 then --//If the distance from the player's point of pickup truck dumping jetty is given weapons to this player. if (getPedWeapon(players, getSlotFromWeapon(theIDweapon)) == 0) then --//Check whether the player has a slot for this weapon, it is not blocked. takeWeapon(thePlayer, theIDweapon) giveWeapon(players, theIDweapon, theTotalAmmo) outputChatBox(getPlayerName(thePlayer).." gave you [Weapons]: "..getWeaponNameFromID(theIDweapon)..", [Patrons]: "..tostring(theTotalAmmo), players, 184, 138, 0) outputChatBox("you have transferred [Weapons]: "..getWeaponNameFromID(theIDweapon)..", [Patrons]: "..tostring(theTotalAmmo)..", "..getPlayerName(players), thePlayer, 184, 138, 0) return 0 else outputChatBox(getPlayerName(players).." already has weapons of this type! ", thePlayer, 184, 138, 0) return 0 end end end takeWeapon(thePlayer, theIDweapon) throwWeaponPickup[#throwWeaponPickup+1] = createPickup(x, y, z, 2, theIDweapon, 10000, theTotalAmmo) end end end --//Bind keys to work with weapons. function bindTheKeys() if (not isKeyBound(source, "l")) then bindKey(source, "l", "down", throwWeapon) end end addEventHandler("onPlayerSpawn", getRootElement(), bindTheKeys)
-
Hey, Long story but short, i just want to know how to connect teleporters like... in map editor if i get a portal how do i link them together?
-
When Ever I go on Map Editor, everything loads and im there, but when i try to get a new file or open/save a file, wont work? say cannot something something blah blah, yeah w/e any help?
-
Is There a Possible Way How To Remove Real Items? Like, the Area 51 secure Gates Around the Area 51 is there a possible way to remove those?
-
I'm Sorry I don't have a script for this but I would really appreciate it If I someone can please make me one of these for free, and I know this is not impossible because allot of helpful people help everyone, and I've seen this before on MTA.
