Jump to content

ViRuZGamiing

Members
  • Posts

    1,050
  • Joined

  • Last visited

Everything posted by ViRuZGamiing

  1. Hi Community, Here's my script: -- Settings for when a player joins -- XYZ coördinates local joinX = -2462.3999023438 local joinY = 132.69999694824 local joinZ = 35.200000762939 -- Weapon and ammo local joinWeapon = 0 local joinAmmo = 0 -- Message when player joins local joinMessage = "Welcome to Belgium-Reallife." -- Skin that player gets local joinSkin = 0 -- Settings for when a player dies -- XYZ coördinates local spawnX = -2462.3999023438 local spawnY = 132.69999694824 local spawnZ = 35.200000762939 -- Weapon and ammo local spawnWeapon = 0 local spawnAmmo = 0 -- Skin that player gets local spawnSkin = 0 -- Settings for the amounts of money -- Money the killer gets local killerMoney = 0 -- Money removed from player when they die local deadPlayerMoney = 0 -- Money you get when you join local joinMoney = 0 -- Functions -- This function spawns players when they join function spawnOnJoin() spawnPlayer(source, joinX, joinY, joinZ, 0 , joinSkin) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox(joinMessage, source) giveWeapon(source, joinWeapon, joinAmmo) givePlayerMoney(source, joinMoney) end -- This function spawns players after they died function spawnOnDead(ammo, killer, weapon, bodypart) outputChatBox(getPlayerName(source).." died.") takePlayerMoney(source, deadPlayerMoney) if (killer) and (killer ~= source) then givePlayerMoney(killer, killerMoney) end setTimer(spawnPlayer, 3000, 1, source, spawnX, spawnY, spawnZ, 0, spawnSkin) setCameraTarget(source, source) setTimer(giveWeapon, 3000, 1, source, spawnWeapon, spawnAmmo) end -- Event handlers addEventHandler("onPlayerJoin", getRootElement(), spawnOnJoin) addEventHandler("onPlayerWasted", getRootElement(), spawnOnDead) What I want I want to add a If getPlayerteam == "Yakuza" then spawnX, spawnY, spawnZ In this the spawnX, spawnY and spawnZ are different then the Civilian's the Gang members need spawn in Base. Thanks for Helping
  2. Hello Community, My script: CLIENT GUIEditor_Label = {} transWindow = guiCreateWindow(182,134,482,342,"Drug Transport",false) guiSetVisible(transWindow, false) destiLabel = guiCreateLabel(19,33,450,55,"Choose your destination",false,transWindow) lsButtonRadio = guiCreateRadioButton(21,104,437,19,"Los Santos, 3000€ if you made it",false,transWindow) lvButtonRadio = guiCreateRadioButton(20,149,437,19,"Las Venturas, 6000€ if you made it",false,transWindow) sfButtonRadio = guiCreateRadioButton(20,193,437,19,"San Fierro, 10000€ if you made it",false,transWindow) acceptButton = guiCreateButton(103,267,113,37,"Accept",false,transWindow) closeButton = guiCreateButton(241,266,108,37,"Close",false,transWindow) local jobmarker = createMarker ( 2448.68, -1976.63, 12.54, "cylinder", 2, 255, 0, 0, 255 ) createBlipAttachedTo (jobmarker, 40) function MarkerHit ( hitPlayer, matchingDimension ) guiSetVisible(transWindow, true) showCursor(true) end addEventHandler ( "onClientMarkerHit", jobmarker, MarkerHit ) function closeChangeJobWindow() if (source == closeButton) then guiSetVisible(transWindow, false) showCursor(false) end end addEventHandler("onClientGUIClick", getResourceRootElement(getThisResource()), closeChangeJobWindow) function lsjobcli() if (source == acceptButton) then if (guiRadioButtonGetSelected(lsButtonRadio)) then triggerServerEvent ("givePlayerJobLS",getLocalPlayer()) guiSetVisible(transWindow, false) showCursor(false) end end end addEventHandler("onClientGUIClick", acceptButton, lsjobcli, false ) function lvjobcli() if (source == acceptButton) then if (guiRadioButtonGetSelected(lvButtonRadio)) then triggerServerEvent ("givePlayerJobLV",getLocalPlayer()) guiSetVisible(transWindow, false) showCursor(false) end end end addEventHandler("onClientGUIClick", acceptButton, lvjobcli, false ) function sfjobcli() if (source == acceptButton) then if (guiRadioButtonGetSelected(sfButtonRadio)) then triggerServerEvent ("givePlayerJobSF",getLocalPlayer()) guiSetVisible(transWindow, false) showCursor(false) end end end addEventHandler("onClientGUIClick", acceptButton, sfjobcli, false ) SERVER function lsjobser () car = createVehicle (440, 2460.52, -2004.38, 13.54) warpPedIntoVehicle(source, car) markerLS = createMarker (1784.78, -1702.06, 12.50, "cylinder", 2, 255, 0, 0, 255) blipLS = createBlipAttachedTo (markerLS, 40) end addEvent ("givePlayerJobLS", true) addEventHandler ("givePlayerJobLS", root, lsjobser) function moneyLS (attacker) if (attacker) and (attacker ~= source) then givePlayerMoney(attacker, 3000) destroyElement(markerLS) destroyElement(blipLS) destroyElement(car) end end addEventHandler( "onMarkerHit", root, moneyLS ) function lvjobser () carlv = createVehicle (440, 2460.52, -2004.38, 13.54) warpPedIntoVehicle(source, carlv) markerLV = createMarker (1074.43, 1292.71, 9.82, "cylinder", 2, 255, 0, 0, 255) blipLV = createBlipAttachedTo (markerLV, 40) end addEvent ("givePlayerJobLV", true) addEventHandler ("givePlayerJobLV", root, lvjobser) function moneyLV (attacker) if (attacker) and (attacker ~= source) then givePlayerMoney(attacker, 6000) destroyElement(markerLV) destroyElement(blipLV) destroyElement(carlv) end end addEventHandler( "onMarkerHit", root, moneyLV ) function sfjobser () carSF = createVehicle (440, 2460.52, -2004.38, 13.54) warpPedIntoVehicle(source, carSF) markerSF = createMarker (-2052.80, 144.87, 27.83, "cylinder", 2, 255, 0, 0, 255) blipSF = createBlipAttachedTo (markerSF, 40) end addEvent ("givePlayerJobSF", true) addEventHandler ("givePlayerJobSF", root, sfjobser) function moneySF (attacker) if (attacker) and (attacker ~= source) then givePlayerMoney(attacker, 10000) destroyElement(markerSF) destroyElement(blipSF) destroyElement(carSF) end end addEventHandler( "onMarkerHit", root, moneySF ) What I want I want to make this only possible for teams called "Yakuza" and "The Triads". What I tried I added in the end of the Server sided this: if getPlayerTeam == "Yakuza" or "The Triads" But it didn't worked, please help.
  3. Hello Community, I have very cool ideas about a Gangwar system and stuff I only can't make it... I've made already the Gangs Ideas: • Marked Places on the Radar (f11) which Gangwar Places supposes. • A Start Icon and when you walk in a GUI appears; Start Gangwar The GW will start and the Gangs who's Place it was will get a Warning "Your place is under attack". They Rush to the Spot and battle against eachother. • At the end I want to do an "if" example; if Triadswin moveObject... if Yakuzawin moveobject This isn't a 100% Correct example. But the who wins will decide what moves I already tried Castillo's GW system but I don't get how it works, the Panel doesn't open and stuff. Greetings Billy, I hope you can help me and understand me.
  4. Thanks I also used that site, my problem is also solved
  5. I tried many Login's of the communnity. Always the Register don't work When write Register Password in console that does work. I think it can be solved by adding the login to the ACL Admin group. Also for your problem. Didn't try it.
  6. Like this; You enter a RolePlaying server and joins a gang (example: mafia) When you enter you are rang 0 with a skin and abbility to drive 1 car of the gang cars. When you make a test the Leader (Rang 5) will promote you. Your skin changes and the car abbility.
  7. Hi Community, Here's my script: local root = getRootElement() function PlayerSpawn() end addEventHandler("onPlayerSpawn", root, PlayerSpawn) My Problems: • Where to put the Coordinates of the Spawnpoint? • How to add when a Player of team Yakuza joins he spawns in the Base? • or when a Civilian joins but he rented a House and spawn there?
  8. Problem solve the "Army" or "MP" worked, Thanks to keep it short "α7мα∂qтя" @3ɑsн8 ɑʟsнɾq why you said it was wrong? You didn't try it
  9. This in Complete? aTeamName = { [ 'Army' ] = true ; [ 'MP' ] = true ; } if aTeamName[ getTeamName( getPlayerTeam( source ) ) ] then local gate = createObject(971, -1530.1999511719, 482.20001220703, 8.8000001907349, 0, 0, 0) megusta = false addCommandHandler("gate", function (source) if ( getTeamName ( getPlayerTeam ( source ) ) == "Army" ) then if (megusta == false) then moveObject(gate, 2500, -1530.1999511719, 482.20001220703, 1.9, 0, 0, 0 ) megusta = true elseif (megusta == true) then moveObject(gate, 2500, -1530.1999511719, 482.20001220703, 8.8000001907349, 0, 0, 0 ) megusta = false else outputChatBox( "you're not a member of the Army!", source, 0, 255, 0, true ) end end end) end Correct me if i'm wrong
  10. I meant can I just do behind Army a "," and then write MP
  11. Also here; local gate = createObject(971, -1530.1999511719, 482.20001220703, 8.8000001907349, 0, 0, 0) megusta = false addCommandHandler("gate", function (source) if ( getTeamName ( getPlayerTeam ( source ) ) == "Army" ) then if (megusta == false) then moveObject(gate, 2500, -1530.1999511719, 482.20001220703, 1.9, 0, 0, 0 ) megusta = true elseif (megusta == true) then moveObject(gate, 2500, -1530.1999511719, 482.20001220703, 8.8000001907349, 0, 0, 0 ) megusta = false else outputChatBox( "you're not a member of the Army!", source, 0, 255, 0, true ) end end end) It's possible to open this only as Army know but i want the MP also be able to open it
  12. I have now a /joinPD and /leavePD and it gives me a Skin, Weapon and autorized to open the Gates... But i see in most RolePlaying Server they have a Rang system. How is this made?
  13. Thanks it worked TAPL, Can you tell me the ones for my last Barrier? Please model=968 gesloten posX=-1701.4000244141 posY=687.59997558594 posZ=24.799999237061 rotX=0 rotY=270 rotZ=90 open posX=-1701.4000244141 posY=687.59997558594 posZ=24.799999237061 rotX=0 rotY=0 rotZ=90
  14. I made a Map and Saved it with Barrier closed (took the Coordinates) Saved again but then open (took the coordinates) This are them. @TAPL I will try your Script first
  15. If used the Originals and then the weird thing happened
  16. The Barrier don't opens and closes like it meant to be. I only need to go up and down
  17. Hello Community, I have 2 Gates and "apart" they work 100% but... Together only 1 Opens and after that nothing happens. My 2 Gate scripts: local gate = createObject(971, -2182.5, 1009.3994140625, 82.599998474121, 0, 0, 0) megusta = false addCommandHandler("gate", function (source) if ( getTeamName ( getPlayerTeam ( source ) ) == "West Coast Cribs" ) then if (megusta == false) then moveObject(gate, 2500, -2182.5, 1009.3994140625, 82.599998474121, 0, 0, 0 ) megusta = true elseif (megusta == true) then moveObject(gate, 2500, -2176.5, 1009.3994140625, 82.599998474121, 0, 0, 0 ) megusta = false else outputChatBox( "you're not a member of the West Coast Cribs!", source, 0, 255, 0, true ) end end end) local gate = createObject(971, -2191.2998046875, 1009.3994140625, 82.599998474121, 0, 0, 0) megusta = false addCommandHandler("gate", function (source) if ( getTeamName ( getPlayerTeam ( source ) ) == "West Coast Cribs" ) then if (megusta == false) then moveObject(gate, 2500, -2191.2998046875, 1009.3994140625, 82.599998474121, 0, 0, 0 ) megusta = true elseif (megusta == true) then moveObject(gate, 2500, -2198.2998046875, 1009.3994140625, 82.599998474121, 0, 0, 0 ) megusta = false else outputChatBox( "you're not a member of the West Coast Cribs!", source, 0, 255, 0, true ) end end end) I want they both to open when I write /gate Thanks, Greetings Billy
  18. And Remember; LeaveTeam not DeleteTeam, It need to stay in the List after i do /leavePD
  19. Hello Community, Here's my script: addEventHandler("onResourceStart",resourceRoot,function () newTeam = createTeam ( "Police" , 0, 255 , 0 ) end) addCommandHandler("joinPD", function(source) if not newTeam then outputChatBox("Team couldn't be created!") return end if getPlayerTeam(source) == newTeam then outputChatBox("You are already a Police Officer!") else setPlayerTeam(source,newTeam) setElementModel(source,284) giveWeapon ( source, 4, 1 ) outputChatBox("Now you are a Police Officer!") end end) My Problem: I want to make a command /leavePD because when I write /joinPD i've joined but when I do /joinArmy after /joinPD i'm in both teams. Greetings Billy
  20. Hi Community, here's my script: bargate = createObject (968,-1572.1999511719,658.90002441406,7.0999999046326,0,90,90) damarker = createMarker (-1572.1999511719,658.90002441406,7.0999999046326, "cylinder", 9.5, 255, 0, 0, 0 ) isMoving = false function gatefunc( hitPlayer ) if ( getElementType ( hitPlayer ) == "player" and isPedInVehicle( hitPlayer ) ) then local veh = getElementModel ( getPedOccupiedVehicle ( hitPlayer ) ) if ( veh == 597 ) and not isMoving then isMoving = true moveObject( bargate, 1500, -1572.1999511719,658.90002441406,7.0999999046326, 0, 0, 0 ) end end end addEventHandler( "onMarkerHit", damarker, gatefunc ) function gatefuncclose( hitPlayer ) if ( getElementType( hitPlayer ) == "player" and isPedInVehicle( hitPlayer ) ) then local veh = getElementModel( getPedOccupiedVehicle( hitPlayer ) ) if ( veh == 597 ) and isMoving then isMoving = false moveObject( bargate, 1500, -1572.1999511719,658.90002441406,7.0999999046326, 0, 0, 0 ) end end end addEventHandler( "onMarkerLeave", damarker, gatefuncclose ) My Problem: I know it's something with my rX, rY or rZ. My Original Coördinates: Closed Barrier: -1572.1999511719,658.90002441406,7.0999999046326, 0, 90, 90 Open barrier: -1572.1999511719,658.90002441406,7.0999999046326, 0, 0, 90
  21. The plate is easy to edit: Go to MTA > Server > .... Resources and search your map with the cars Open the Folder and Edit the .map file with Notepad++ At every car stands the Plate edit the Plate to in this case "Mafia"
×
×
  • Create New...