-
Posts
4,961 -
Joined
-
Last visited
Everything posted by Jaysds1
-
try this: Server: local SWATteam addEventHandler ("onResourceStart", resourceRoot,function(res) if res~=resource then return end SWATteam = createTeam ("SWAT", 0, 0, 255) end) addEvent("setSWAT", true) addEventHandler("setSWAT",root,function() setPlayerTeam(source,SWATteam) setElementModel(source, 285) giveWeapon ( source, 3 ) local playeraccount = getPlayerAccount( source ) setAccountData(playeraccount, "team", "SWAT")--Only 3 arguements outputChatBox("You are now SWAT.",source,0,0,255) end) addEvent("removeSWAT", true) addEventHandler("removeSWAT",root,function() setPlayerTeam(source, 0) local playeraccount = getPlayerAccount(source) setElementModel(source,getAccountData(playeraccount,"standardskin") or 0) outputChatBox("You are now an unemployed.",source,255,0,0) end) local arrestTeam = {["police"]=true,["SWAT"]=true,["FBI"]=true} addEventHandler ("onPlayerDamage",root,function( attacker, attackerweapon, bodypart, loss ) if not attacker or getElementType(attacker)~="player" then return end local theTeam = getPlayerTeam ( attacker ) local theWL = getPlayerWantedLevel ( source ) local theSkin = getElementModel ( attacker ) if (attackerweapon == 3) and (loss > 2 ) and (theWL > 0) then if arrestTeam[getTeamName( theTeam )] then setElementPosition (source, 4076.3999023438, -1788.5, 3.511967, true) local theName = getPlayerName ( source ) local theCop = getPlayerName ( attacker ) outputChatBox ( "You have been jailed by "..theCop.. " for 60 seconds.", source ) givePlayerMoney (attacker, 100) setTimer ( setElementPosition, 60000, 1, source, 1544.4332275391, -1674.7698974609, 13.688399200439) setPlayerWantedLevel(source, 0) end end end) --why do you have policeJob instead of SWATjob Client: local marker = createMarker( 1288.7602539063, -1642.1657714844, 12.5, "Cylinder", 1.4, 0, 0, 255, 255) local GUIEditor_Button = {} local GUIEditor_Memo = {} local GUIEditor_Label = {} function guiMyCwindow(w,h,t) local x,y = guiGetScreenSize() return guiCreateWindow((x-w)/2,(y-h)/2,w,h,t,false) end local windowjob = guiMyCwindow(301,170,"[sGN] SWAT Team ") 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) guiSetVisible(windowjob, false) addEventHandler("onClientMarkerHit",marker,function(ele) if getElementType(ele)~="player"then return end local pTeam = getPlayerTeam(ele) if pTeam and getTeamName(pTeam)~="SWAT"then guiSetVisible(windowjob, true) showCursor(true) end end) addEventHandler("onClientMarkerLeave", marker, function(ele) if getElementType(ele)~='player'then return end guiSetVisible(windowjob, false) showCursor(false) end) addEventHandler("onClientGUIClick",guiRoot,function() if source==GUIEditor_Button[1]then triggerServerEvent("setSWAT",localPlayer) guiSetVisible(windowjob, false) showCursor(false) elseif source==GUIEditor_Button[2]then guiSetVisible(windowjob, false) showCursor(false) elseif source==GUIEditor_Button[3]then triggerServerEvent("removeSWAT",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end end,true)
-
try this: Client: local peds = {} function camera ( ) for _,ped in ipairs(peds)do local x, y, z = getElementPosition(peds[ped]) setCameraMatrix(x+12, y+11, z+4, x, y, z) end removeEventHandler("onClientRender",root,camera) end addEvent("showNextMapTextx",true) addEventHandler("showNextMapTextx",root,function() triggerServerEvent("onCameraStartz",root) addEventHandler("onClientRender",root,camera) end) addEvent( "onCameraStart", true ) addEventHandler( "onCameraStart",root,function(ped1,car1) setPedControlState(ped1,"accelerate",true) setTimer(setPedControlState,800,1,ped1,"accelerate",false) if not peds[ped1] then peds[ped1] = car1 end end) Server: addEvent("onCameraStartz",true) addEventHandler("onCameraStartz",root,function() local ped1 = createPed(0, 138.70454406738, 2491.1267089844, 16.484375) local car1 = createVehicle(411, -73.699996948242, 2506.3999023438, 16.299999237061,0,0,270) warpPedIntoVehicle ( ped1, car1) triggerClientEvent("onCameraStart",root, ped1, car1) setTimer(function() destroyElement(car1) destroyElement(ped1) end,5000,1) end)
-
Try this: Server: addEventHandler("onPlayerJoin",root,function() local countryCode = exports.admin:getPlayerCountry(source) if not countryNames then outputChatBox("YOU LIED ABOUT THEE TABLE EXISTING!!!") end setElementData(source,"country",countryNames[countryCode]) triggerClientEvent ("onClientJoined",root, source, tostring ( countryNames [ countryCode ] ) ) end) Client: addEvent("onClientJoined", true ) addEventHandler("onClientJoined",root,function(player,countryNames) --forgot to define the player and the country codes AddingS("join", getPlayerName(player).."#FFFFFF joined #FF4000[#ffffff"..countryNames.."#FF4000]") end) If that doesn't work, then please post the full script
-
there's no type for file tags: meta.xml try this: > name ="OldFilmShader" description="Old Film Shader v1" author ="Sam@ke" version="1.0.0" type="script" /> ="shader.lua" type="client"/> src="shaders/old_film.fx"/>>
-
Please post the full script, because this is nothing...
-
try this: local screenWidth, screenHeight = guiGetScreenSize() local myScreenSource = dxCreateScreenSource(screenWidth, screenHeight) local flickerStrength = 0 local blurStrength = 0.000 local noiseStrength = 0.000 local oldFilmShader, oldFilmTec function createShader() oldFilmShader, oldFilmTec = dxCreateShader("shaders/old_film.fx") if not oldFilmShader then outputChatBox("Could not create oldFilmShader. Please use debugscript 3") else outputChatBox("Using technique " .. oldFilmTec) end end addEventHandler("onClientResourceStart", resourceRoot,function() if getVersion ().sortable < "1.1.0" then outputChatBox("Resource is not compatible with this client.") return end createShader() end) function upDateScreenSource() dxUpdateScreenSource(myScreenSource) end function updateScreen() upDateScreenSource() if oldFilmShader then --check localPlayers health local flickering = math.random(100 - flickerStrength, 100)/100 dxSetShaderValue(oldFilmShader, "ScreenSource", myScreenSource) dxSetShaderValue(oldFilmShader, "Flickering", flickering) dxSetShaderValue(oldFilmShader, "Blurring", blurStrength) dxSetShaderValue(oldFilmShader, "Noise", noiseStrength) dxDrawImage(0, 0, screenWidth, screenHeight, oldFilmShader) end end addEventHandler("onClientPlayerWasted",localPlayer,function() addEventHandler("onClientPreRender", root,updateScreen) end) addEventHandler("onClientPlayerSpawn",localPlayer,function() removeEventHandler("onClientPreRender",root,updateScreen) end)
-
It usually happens when you're trying to index a table, so, when you put ' : ' at the end of line 2, it's attempting to index a table.
-
for _,veh in next, getElementsByType ( 'vehicle' ) do use ipairs and you had a ' : ' at the end of line 2.
-
try this: local marker = createMarker ( 205.71435546875, 2511.4284667969, 16.558746337891 - 1, 'checkpoint', 20, 255, 255, 255, 255 ) createBlipAttachedTo ( marker, 9 ) addEventHandler ('onMarkerHit',marker,function ( car ) if getElementType ( car ) == 'vehicle' then destroyElement ( car ) end end) setTimer (function () for _,veh in ipairs(getElementsByType ( 'vehicle' )) do if isElementWithinMarker ( veh, marker ) then destroyElement ( veh ) end end end,1000,0)
-
This video is not a new map, it's just an extension to MTA... Please read the first post again: https://forum.multitheftauto.com/viewtopic.php?f ... 07#p528608
-
It might be your ports. Try typing in "openports" in the server console(the black window) and see what it says. If it says that the ports are closed, then visit this topic: https://forum.multitheftauto.com/viewtopic.php?f ... ms#p352164
-
Sorry, 1. This is the support section 2.a. You would need to try to make one your self 2.b. Unless you want to Pay someone for this.
-
Open your mtaserver.conf file and remove the ip, then try starting your server again.
-
Well, you could pay a hosting service to keep your server up 24/7. Check these Official hosting services: http://www.multitheftauto.com/hosters If you want to manage your own server and host it your self then you could buy a vps and upload it there and it would be online for 24/7. Only one I know: http://domvps.com
-
Sorry that we didn't post anything, as you might know that we are all busy, but I'm glad you fixed your issue.
-
To add mods to your server, you would need to have knowledge about Lua it self, then use the MTA Functions to add mods.
-
ok, MTA uses the HDD (Your Hard Drive) to store the serial and if you reinstall Windows then you will get a new serial. I'm not sure why you didn't get a new serial again.
-
Thanks, I feel nice to hear that
-
Thanks, for the suggestions, I have posted it in the tracker,oh and can you pm me the problems that you had with the Bug Tracker please?