Jump to content

micheal1230

Members
  • Posts

    390
  • Joined

  • Last visited

Everything posted by micheal1230

  1. Lol yet another roleplay server that is being started by someone that has no idea about scripting
  2. Its trying to export to the animation resource but its not running or there isnt one
  3. i dont know what is wrong with your markers you need to fix them, they seem fine check /debugscript 3
  4. Here function createTeamsOnStart () Busdriver = createTeam ( "Busdriver", 0, 200, 255 ) end addEventHandler("onResourceStart", resourceRoot, createTeamsOnStart) marker1 = createMarker (1808,-1904.3000488281,12.5,"cylinder",1.2,0,0,225,100) marker2 = createMarker (1794.4000244141,-1932.1999511719,12.39999961853,"cylinder",2,0,255,225,100) blip1 = createBlip ( 1808,-1904.3000488281,12.5, 56, 2) blip2 = createBlip ( 1794.4000244141,-1932.1999511719,12.39999961853, 53 ) attachElements (blip1,marker1,0,0,0) ped1 = createPed (1808,-1904.3000488281,12.5) ped2 = createPed (1794.4000244141,-1932.1999511719,12.39999961853,4) attachElements (ped2,marker2,0,0,0) setPedRotation (ped1,180) setPedAnimation( ped1, "paulnmac", "wank_loop" ) setElementDimension ( marker2, 0 ) setElementDimension ( ped2, 0 ) setElementDimension ( blip2, 0 ) setElementFrozen ( ped1, true ) function showGUI(hitPlayer) triggerClientEvent (hitPlayer,"show",getRootElement(),hitPlayer) end addEventHandler ("onMarkerHit",marker1,showGUI) addEventHandler("onMarkerLeave",marker1, function (leavePlayer) triggerClientEvent(leavePlayer,"hide",leavePlayer) end) function start(hitPlayer) help = createVehicle(437,1783.0999755859,-1929.1999511719,13.60000038147) outputChatBox("Go now to the flag to get your money", source, 255, 2, 0) setElementDimension ( help, 0 ) end addEventHandler ("onMarkerHit",marker2,start) jobmarker = createMarker ( 1536.1999511719,-1669.9000244141,12.39999961853, cylinder, 5, 255, 200, 0, 250, getRootElement() ) blip4 = createBlip ( 1536.1999511719,-1669.9000244141,12.39999961853, 53 ) setElementDimension ( blip4, 0 ) setElementDimension ( jobmarker, 0 ) function eindMission (player) if ( getElementDimension ( source ) == 0 ) then destroyElement ( help ) setElementPosition( player, 1536.1999511719,-1669.9000244141,12.39999961853 ) setElementDimension ( player, 0 ) givePlayerMoney ( player, 500 ) end end addEventHandler( "onMarkerHit", jobmarker, eindMission ) function spawnbus(player) local x,y,z = getElementPosition(player) if ( getTeamName( getPlayerTeam( player ) ) == 'Busdriver' ) createVehicle(437, x+3,y,z) else outputChatBox("You are not a Bus Driver.", player, 255,0,0) end end addEventHandler("onMarkerHit", marker1, spawnbus)
  5. I want to know how you know what element to put cuz sometimes i put player then people tell me its source im like how do you know that? Also how can i set a timer to a line of code like in the example
  6. what is this? When you enter the marker it gives you a bus thats what you wanted?
  7. i want to know what element to put when your using functions and how to find out what one also how can you set timers to lines of code for example -- THiS IS A EXAMPLE OF THE TIMER THING! -- Ignore the random stuff like hasHeDied. This is just trying to help you understand me function test() local test = hasHeDied if ( test == true ) then setTimer(spawnPlayer,0,0,0), 5000, 0) end end
  8. Its not whant its want and its not spam its spawn outputChatBox ("Step one time in the marker for spam a Bus",225,0,0) ServerSide: function spawnbus(player) local x,y,z = getElementPosition(player) if ( getTeamName( getPlayerTeam( player ) ) == 'Busdriver' ) createVehicle(437, x+3,y,z) else outputChatBox("You are not a Bus Driver.", player, 255,0,0) end end addEventHandler("onMarkerHit", marker1, spawnbus)
  9. woops left that in i was going to have it all in 1 function but i didnt
  10. I dont respawn, it just stays in death cam
  11. Well im getting a bad arg at everything with player next to it function balladeath(player) local getteam = getPlayerTeam ( player ) local getskin = getElementModel( player ) if getPlayerTeam(localPlayer) and getTeamName(getPlayerTeam(localPlayer)) == "Ballas" then spawnPlayer(player, 1922.4970703125, -1127.9501953125, 25.042316436768, 0, getskin, 0, 0, getteam) else cancelEvent() end end addEventHandler("onPlayerWasted", getRootElement(), balladeath) function policedeath(player) local getteam = getPlayerTeam ( player ) local getskin = getElementModel( player ) if getPlayerTeam(localPlayer) and getTeamName(getPlayerTeam(localPlayer)) == "Police" then spawnPlayer(player, 1545.6162109375, -1675.33203125, 13.560710906982, 95, getskin, 0, 0, getteam) else cancelEvent() end end addEventHandler("onPlayerWasted", getRootElement(), policedeath) function grovedeath(player) local getteam = getPlayerTeam ( player ) local getskin = getElementModel( player ) if getPlayerTeam(localPlayer) and getTeamName(getPlayerTeam(localPlayer)) == "Grove" then spawnPlayer(player, 2495.24609375, -1687.2548828125, 13.515160560608, 0, getskin, 0, 0, getteam) else cancelEvent() end end addEventHandler("onPlayerWasted", getRootElement(), grovedeath)
  12. How can i learn this? If you want to learn, then click this link and read it: https://wiki.multitheftauto.com/wiki/triggerServerEvent If you don't want to learn, then wait for someone to make the code and give you. Will this work? local localPlayer = getLocalPlayer() function capturearea() triggerEvent("takeover:gui", getRootElement()) if( guiProgressBarGetProgress( progressBar ) == 100 ) then triggerServerEvent("takeover:complete", getRootElement(), localPlayer, command) end end addCommandHandler("capture", capturearea)
  13. How can i learn this? If you want to learn, then click this link and read it: https://wiki.multitheftauto.com/wiki/triggerServerEvent If you don't want to learn, then wait for someone to make the code and give you. Mate im trying Edit: Could you tell me what section to read cause i have read the first huge paragraph and it does'nt say anything about passing arguments it just tell me what i can pass.
  14. Yes but your asking for the function when we dont even know what the script is maybe go have a look at the error line
  15. That you made the same mistake as me.
  16. You wont learn lua copying and pasting i learnt that a bit ago
  17. Ok here is my script Client: local progressBar = guiCreateProgressBar(501,54,334,35,false); progressTimer = setTimer(progresstimer,1000, 0 ); function progresstimer( ) guiProgressBarSetProgress( progressBar, guiProgressBarGetProgress( progressBar ) + 5 ); if( guiProgressBarGetProgress( progressBar ) == 100 ) then killTimer( progressTimer ); end end, function hideall() guiSetVisible(progessBar, false) end addEventHandler("onClientResourceStart", resourceRoot, hideall) addEvent("takeover:gui") addEventHandler("takeover:gui", getRootElement(), function () addEventHandler("onClientRender",root,territorytakeover) end) function territorytakeover() dxDrawText("Territory Takeover",546.0,22.0,771.0,53.0,tocolor(255,0,0,255),1.0,"pricedown","left","top",false,false,false) end function capturearea() triggerEvent("takeover:gui", getRootElement()) if( guiProgressBarGetProgress( progressBar ) == 100 ) then triggerServerEvent("takeover:complete", getRootElement()) end end addCommandHandler("capture", capturearea) Server: local ballasAreas = { createRadarArea( 2077.2470703125, -1099.728515625, -220, -180, 255,0,255, 100 ), createRadarArea( 1981.6513671875, -1350.298828125, -140, -130, 255,0,255, 100 ), createRadarArea( 2268.5859375, -1138.28515625, -100, -100, 255,0,255, 100 ), createRadarArea( 2184.7529296875, -1108.1435546875, -110, -120, 255,0,255, 100 ), createRadarArea( 2176.033203125, -1224.8935546875, -100, -80, 255,0,255, 100 ), createRadarArea( 2265.5126953125, -1233.033203125, -100, -80, 255,0,255, 100 ), createRadarArea( 2261.82421875, -1297.7451171875, -100, -80, 255,0,255, 100 ), createRadarArea( 2165.7333984375, -1305.1416015625, -100, -80, 255,0,255, 100 ); } addEvent("takeover:complete") addEventHandler("takeover:complete",getRootElement(), function( player, command ) local hitAreas = { } local posX, posY = getElementPosition( player ); for _,v in pairs( ballasArea ) do if( isInsideRadarArea( v, posX, posY ) ) then table.insert( hitAreas, v ); end end if( #hitAreas == 1 ) then if( getPlayerTeam( player ) and getTeamName( getPlayerTeam( player ) ) == 'Grove' or getTeamName( getPlayerTeam( player ) ) == 'Ballas' ) then local r, g, b, a = getRadarAreaColor( hitAreas[1] ); if( r == 255 and g == 0 and b == 255 ) then setRadarAreaColor( hitAreas[1], 0, 255, 0, 100 ); setRadarAreaFlashing( hitAreas[1], true ); else setRadarAreaColor( hitAreas[1], 255, 0, 255, 100 ); end end end end )
  18. Mate maybe learn to script before you make a roleplay server or you will get know were, and we cant find out the function for you because we dont have the script go look for the function yourself. It is not hard to find a function maybe go to the line where the error is P.S. Learn To Script
  19. Well here is my code, also how can i put all the balla area's into one without needing to make tons of functions for each area. local ballabase = createRadarArea(2077.2470703125, -1099.728515625, -220, -180, 255,0,255, 100) local ballaskate = createRadarArea(1981.6513671875, -1350.298828125, -140, -130, 255,0,255, 100) local ballamotel = createRadarArea(2268.5859375, -1138.28515625, -100, -100, 255,0,255, 100) local ballashops = createRadarArea(2184.7529296875, -1108.1435546875, -110, -120, 255,0,255, 100) local ballahouse = createRadarArea(2176.033203125, -1224.8935546875, -100, -80, 255,0,255, 100) local ballahouse2 = createRadarArea(2265.5126953125, -1233.033203125, -100, -80, 255,0,255, 100) local ballahouse3 = createRadarArea(2261.82421875, -1297.7451171875, -100, -80, 255,0,255, 100) local ballahouse4 = createRadarArea(2165.7333984375, -1305.1416015625, -100, -80, 255,0,255, 100) function ballabase (theElement, theArea) local r,g,b,a = getRadarAreaColor ( ballabase ) local posX, posY = getElementPosition( theElement ) local inarea = isInsideRadarArea ( ballabase, posX, posY ) if ( inarea ) then if getPlayerTeam(localPlayer) and getTeamName(getPlayerTeam(localPlayer)) == "Grove" or "Ballas" then if r == 255 and g == 0 and b == 255 then setRadarAreaColor(ballabase, 0,255,0,100) setRadarAreaFlashing ( ballabase, true ) else setRadarAreaColor(ballabase, 255,0,255,100) end end end end addCommandHandler("capture", ballabase)
  20. Hey Soild It might be what happened to me rememeber when i but get root element and when i restarted any resource it another
  21. Lol your too young to be able to pay anyone your "parents would put there card in the internet" Says Sarah Edit: Your 12
  22. Oh you want something to tell players what map is next, explain better nextime and we dont make script for free. Go and try and learn lua then make it You can use dxDrawText
×
×
  • Create New...