Jump to content

justn

Members
  • Posts

    525
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by justn

  1. I know how to use that.. i mean, how to check, if that player is the only person is alive ? and how to see when everyone dies, so the map can restart?
  2. Hi, im working on a voteredo script, how do i check, when a player hits the hunter, if hes the only person alive and with a hunter, then the map will restart ? and if everyone dies, the map restarts. Thanks.
  3. Where is "player" defined in the client-side ?
  4. justn

    dxDrawText

    Wait, so you're using Al3grab's "random word" script and u wanna remove outputChatBox and use dxDrawText only ? If yes then remove this from server side: outputChatBox("- Random Words : #FFFF00Enter the word shown below to win the prize.",root,0,255,0,true) outputChatBox("=========",root,0,255,0,true) outputChatBox("Word : "..code.."",root,255,255,0,true) outputChatBox("Prize : "..prize.."$",root,255,255,0,true) outputChatBox("=========",root,0,255,0,true) outputChatBox("- #FFFF00You can see the word down on your screen.",root,0,255,0,true)
  5. The source of the event "onMarkerHit" is the marker that got hit by the player so in this case "element" would be the player. So this would be your new code marker = createMarker ( 150.84593, 2470.74512, 17.70313, "arrow", 1.5, 0, 0, 255, 255 ) function hit( element ) if ( source == marker ) then setElementInterior( element, 12 ) setElementPosition( element, 150.84593, 2470.74512, 17.70313) end end addEventHandler("onMarkerHit", root, hit)
  6. myWindow = guiCreateWindow ( 20, 200, 100, 100, "Mapa", true ) guiSetVisible(myWindow,false) guiCreateStaticImage( 20, 200, 100, 100, "radar.png", false, myWindow ) function mymap () guiSetVisible(myWindow,not guiGetVisible ( myWindow )) showCursor(not isCursorShowing()) end addCommandHandler( "abrirmapa", mymap ) bindKey( "F10", "down", mymap )
  7. justn

    Vehicle save

    I guess he lagged and kept clicking submit.
  8. justn

    Help PLs

    Just replace outputChatBox with exports.ORCcommands:sendMessage
  9. justn

    Help PLs

    This should work. vehicle1 = createVehicle(487, 2798, 2548.900390625, 22.700000762939, 0, 0, 43.994750976563) -- This car can be toggleVehicleRespawn ( vehicle1 , true ) setVehicleRespawnDelay ( vehicle1 , 10000) -- Araç patladıktan kaç saniye sonra respawnlanacağını belirtir. setVehicleIdleRespawnDelay ( vehicle1 , 60000) -- state = setVehicleDoorState ( vehicle1, 1, 1 ) setVehicleDamageProof ( vehicle1, true ) -----car won't take damage (change it to false if you want to take damage) function lockPrivate( player, seat ) if ( source == vehicle1 ) then if ( seat == 0 ) or ( seat == 1 ) or ( seat == 2 ) or ( seat == 3 ) or ( seat == 4 ) then if ( getTeamName(getPlayerTeam( player )) == 'Admins' ) then outputChatBox("Tekrar Hoşgeldin Admin Bey.", player, 255, 190, 0) else outputChatBox("Buna Binmen İçin Admin Olman Gerek.", player, 255, 190, 0) cancelEvent ( ) end end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lockPrivate)
  10. justn

    Help PLs

    I edited it ._. try my code again
  11. justn

    Help PLs

    Vehicle does not what ? //EDIT: I just edited my code, try that
  12. justn

    Help PLs

    Here you go vehicle1 = createVehicle(487, 2798, 2548.900390625, 22.700000762939, 0, 0, 43.994750976563) -- This car can be toggleVehicleRespawn ( vehicle1 , true ) setVehicleRespawnDelay ( vehicle1 , 10000) -- Araç patladıktan kaç saniye sonra respawnlanacağını belirtir. setVehicleIdleRespawnDelay ( vehicle1 , 60000) -- state = setVehicleDoorState ( vehicle1, 1, 1 ) setVehicleDamageProof ( vehicle1, true ) -----car won't take damage (change it to false if you want to take damage) function lockPrivate( player, seat ) if ( source == vehicle1 ) then if ( seat ~= 0 ) and ( getTeamName(getPlayerTeam( player )) == 'Admins' ) then exports.ORCcommands:sendMessage("Buna Binmen İçin Admin Olman Gerek.", player, 255, 190, 0) else exports.ORCcommands:sendMessage("Tekrar Hoşgeldin Admin Bey.", player, 255, 190, 0) cancelEvent ( ) end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lockPrivate)
  13. gate1 = createObject ( MODEL ID HERE,-2439.599609375, 1538.099609375, 14.699999809265, 0, 0,0 ) function gate1Open() moveObject ( gate1, 2000, -2439.6000976563, 1546.3000488281, 14.699999809265 ) end addCommandHandler("main", gate1Open) function gate1Close () moveObject ( gate1, 2000, -2439.6000976563, 1538.0999755859, 14.699999809265) end addCommandHandler("main", gate1Close ) and use the object model ID https://wiki.multitheftauto.com/wiki/CreateObject
  14. Please visit the wiki if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("Owner")) then setPlayerTeam(source,getTeamFromName("Fast War Server Owner"))
  15. justn

    Zone events

    Hi, I have some events which i think should be added, first I'll start with. Zone events onZoneEnter The event is triggered when a player enters a zone Parameters zone theZone theZone: The zone that the player has entered Source The source of this event is the zone that the player has entered Example This would be the example which outputs chatbox when the player has entered the zone of "Los Santos" addEventHandler("onZoneEnter",getRootElement(), function ( theZone ) if theZone == "Los Santos" then outputChatBox("A player has entered the zone of "..theZone) end end) & onZoneExit This event is triggered when a player exits a zone Parameters zone theZone theZone: The zone that the player has exited Source The source of this event is the zone that the player has exit Example This would be the example which outputs chatbox when the player has exits the zone of "Los Santos" addEventHandler("onZoneExit",getRootElement(), function ( theZone ) if theZone == "Los Santos" then outputChatBox("A player has exited the zone of "..theZone) end end) Thanks, hoping that events would come soon.
  16. Your code had quite a number of errors, try this: function PlayerJoin () theTeam = createTeam ( "Fast War Server Owner" ) -- create a new team with the specified name outputChatBox ( "Set Team Creado por #ff5000-ffw-#6600CCRandom*" .. joinedPlayerName .. " to ".. serverName .."!" , source, 255, 255, 255 ) end addEventHandler("onResourceStart", getRootElement(), PlayerJoin) function CreateTeam () local accName = getAccountName ( getPlayerAccount ( source ) ) if ( accName ) and not isGuestAccount ( accName ) then if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Admin" ) ) then -- if it was successfully created setPlayerTeam ( source, theTeam ) end end end addEventHandler ( "onPlayerLogin", getRootElement(), CreateTeam )
  17. Hi I'm working on a little script, and I have a problem with setElementVisibleTo No errors in debugscript addEvent("CreateCaptainMarker",true) addEventHandler("CreateCaptainMarker",getRootElement(), function(x,y,z) local playerName = getPlayerName(source) local playerFromName = getPlayerFromName(playerName) if playerName and playerFromName then CaptainMarker[source] = createMarker ( x, y, z, "cylinder", 5, 255, 51, 102, 85) CaptainAttachedBlip[source] = createBlipAttachedTo(CaptainMarker[source],9) setElementVisibleTo(CaptainMarker[source],playerFromName,true) setElementVisibleTo(CaptainMarker[source],root,false) setElementVisibleTo(CaptainAttachedBlip[source],playerFromName,true) setElementVisibleTo(CaptainAttachedBlip[source],root,false) end end )
  18. justn

    Small Problem

    Hi, I'm currently working on a vehicle shop, and I have just a small problem with getting the player money. ERROR: VehicleShop\client.lua:66: attempt to compare nil with number Line 66 in this code would be line 15 addEventHandler("onClientGUIClick",BuyCar_Window, function(b) if b == "left" then if source == BuyCar_Close then guiSetVisible(BuyCar_Window,false) showCursor(false) elseif source == BuyCar_Test then local GuiGetTestText = guiGridListGetItemText(BuyCar_Grid,guiGridListGetSelectedItem(BuyCar_Grid),BuyCar_VehName) if ( GuiGetTestText ) then end elseif source == BuyCar_Buy then local GuiGetBuyText = guiGridListGetItemText(BuyCar_Grid,guiGridListGetSelectedItem(BuyCar_Grid),BuyCar_VehName) local GuiGetBuyText1 = guiGridListGetItemText(BuyCar_Grid,guiGridListGetSelectedItem(BuyCar_Grid),BuyCar_VehPrice) if ( GuiGetBuyText ) then if getPlayerMoney() >= tonumber(GuiGetBuyText1) then else exports["TopBarChat"]:sendClientMessage("#FF0000* #00ff00You do not have enough money for this vehicle",255,255,255,true) end end end end end)
  19. If you read my code, i think you would see, what the timer is for
  20. Just try this and tell me if the pickup destroys now function onHit() setTimer(function() test = createPickup (653.35773, -1769.18567, 13.57368, 3, 1247, 10000 ) addEventHandler("onPickupHit",test, function(player) if isPedInVehicle(player) then local vehicle = getPedOccupiedVehicle(player) setPlayerWantedLevel(getVehicleController(vehicle),getPlayerWantedLevel(getVehicleController(vehicle))-1) destroyElement(test) else setPlayerWantedLevel(player,getPlayerWantedLevel(player)-1) destroyElement(test) end end,60000,0) end) end addEventHandler("onResourceStart",resourceRoot, onHit)
  21. All he's saying is to replace this ( from his earlier code ) star = createObject (1247, 653.35773, -1769.18567, 13.57368 ) to star = createPickup(653.35773, -1769.18567, 13.57368, 3, 1239, 60000) -- I got some of this from what you posted earlier
  22. This should work, if you are still having this problem, then show me your next code when the player hits the marker vehicleGUI = guiCreateWindow(314, 215, 160, 211, "", false) guiWindowSetSizable(vehicleGUI, false) guiSetVisible(vehicleGUI,false) vehLabelOne = guiCreateLabel(13, 36, 15, 15, "1.", false, vehicleGUI) vehButtonOne = guiCreateButton(38, 26, 107, 36, "LSPD Vehicle", false, vehicleGUI) vehLabelTwo = guiCreateLabel(13, 86, 15, 15, "2.", false, vehicleGUI) vehButtonTwo = guiCreateButton(38, 76, 107, 36, "LSPD Rancher", false, vehicleGUI) vehLabelThree = guiCreateLabel(13, 138, 15, 15, "3.", false, vehicleGUI) vehButtonThree = guiCreateButton(38, 128, 107, 36, "LSPD Motorbike", false, vehicleGUI) vehClose = guiCreateButton(86, 179, 64, 22, "Close", false, vehicleGUI) function onMarkerHit(hitElement,matchingDimension) if ( hitElement == localPlayer) then if source == vehMarker then guiSetVisible(vehicleGUI,true) showCursor ( true ) end end end addEventHandler("onClientMarkerHit",root,onMarkerHit)
×
×
  • Create New...