Jump to content

Vision

Members
  • Posts

    405
  • Joined

  • Last visited

Everything posted by Vision

  1. Like this? function drop (thePlayer) setElementPosition ( thePlayer, -1053.99548, 1558.86609, 1115.13196 ) outputChatBox ( "The player ".. getPlayerName(thePlayer) .." has teleported to drop 1 (/drop)", root, 0, 255, 0 ) end addCommandHandler ( "drop", drop ) function drop2 (thePlayer) setElementPosition ( thePlayer, -681.61298, -331.70407, 1065.12817 ) outputChatBox ( "The player ".. getPlayerName(thePlayer) .." has teleported to drop 2 (/drop2)", root, 0, 255, 0 ) end addCommandHandler ( "drop2", drop2 ) function drop3 (thePlayer) setElementPosition ( thePlayer, 1580.10986, 1016.11517, 1336.80627 ) outputChatBox ( "The player ".. getPlayerName(thePlayer) .." has teleported to drop 3 (/drop3)", root, 0, 255, 0 ) end addCommandHandler ( "drop3", drop3 )
  2. Modification https://community.multitheftauto.com/index.php?p= ... ls&id=5919 https://community.multitheftauto.com/index.php?p= ... ls&id=5918 DONE
  3. Modification https://community.multitheftauto.com/index.php?p= ... ls&id=5902 https://community.multitheftauto.com/index.php?p= ... ls&id=5903 https://community.multitheftauto.com/index.php?p= ... ls&id=5907 DONE
  4. Try to change this exports.notifications.showBox("info","test") to this exports["notifications"]:showBox("info","test")
  5. Car mod https://community.multitheftauto.com/ind ... ls&id=5811 DONE
  6. Car mod https://community.multitheftauto.com/ind ... ls&id=5792 https://community.multitheftauto.com/ind ... ls&id=5791 https://community.multitheftauto.com/ind ... ls&id=5796 https://community.multitheftauto.com/ind ... ls&id=5795 DONE
  7. No description https://community.multitheftauto.com/index.php?p= ... ls&id=4768 DONE
  8. --Markers-- LVMarker = createMarker ( -47.673049926758, -62.346290588379, -10.607986450195, "cylinder", 1.5, 255, 0, 0, 170 ) SFMarker = createMarker ( -47.673049926758, -67.268165588379, -10.607986450195, "cylinder", 1.5, 0, 255, 0, 170 ) LSMarker = createMarker ( -47.673049926758, -71.514259338379, -10.607986450195, "cylinder", 1.5, 0, 0, 255, 170 ) --handles the joining of countries-- function LVSpawn ( source ) aclGroupAddObject ( aclGetGroup("LVCiv"), "user."..getAccountName(getPlayerAccount(source)) ) end addEventHandler( "onMarkerHit", LVMarker, LVSpawn ) function SFSpawn ( source ) aclGroupAddObject ( aclGetGroup("SFCiv"), "user."..getAccountName(getPlayerAccount(source)) ) end addEventHandler( "onMarkerHit", SFMarker, SFSpawn ) function LSSpawn ( source ) aclGroupAddObject ( aclGetGroup("LSCiv"), "user."..getAccountName(getPlayerAccount(source)) ) end addEventHandler( "onMarkerHit", LSMarker, LSSpawn ) -- Checks if the player is in one of the ACL Groups and if not spawns him in a place to choose addEventHandler("onPlayerLogin", root, function() if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)), aclGetGroup ( "SFCiv" ) ) then spawnPlayer ( source, -2624.373046875, 1412.80078125, 7.09375 ) elseif isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)), aclGetGroup ( "LVCiv" ) ) then spawnPlayer ( source, 1685.8544921875, 993.6201171875, 10.8203125) elseif isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)), aclGetGroup ( "LSCiv" ) ) then spawnPlayer ( source, 1727.70703125, -1118.552734375, 24.085935592651) else spawnPlayer ( source, -81.016799926758, -81.045509338379, -10.607986450195 ) end end )
  9. Modification https://community.multitheftauto.com/index.php?p= ... ls&id=5758 https://community.multitheftauto.com/index.php?p= ... ls&id=5463 https://community.multitheftauto.com/index.php?p= ... ls&id=5454 https://community.multitheftauto.com/index.php?p= ... ls&id=5757 DONE
  10. Try this function zomb() local x, y, z = getElementPosition(source) exports [ "slothBot" ]:spawnBot ( x, y, z, 0, 10, 0, 0, Zombies, 0, "hunting", true ) end addEventHandler ( "onPlayerSpawn", getRootElement(), zomb)
  11. Car mod https://community.multitheftauto.com/ind ... ls&id=5733 DONE
  12. Your code is wrong, but I made some changes Server ammunationout = createMarker( 2159.5419921875, 943.201171875, 10.8200125, "cylinder", 2.0, 255, 0, 0, 150 ) ammunationin = createMarker( 285.9794921875, -86.7666015625, 1001.5228881836, "cylinder", 2.0, 255, 0, 0, 150 ) setElementInterior( ammunationin, 4 ) theMarker = createMarker( 291.8251953125, -83.2900390625, 1001.515625, "cylinder", 1.5, 255, 255, 0, 255 ) setElementInterior( theMarker, 4) function gunshopAOUT( player ) -- defines gunshopAOUT function if isPedInVehicle( player ) == false then setElementInterior( player, 4, 285.8000, -84.5470, 1001.5390 ) end end function gunshopAIN( source ) -- defines gunshopAIN function setElementInterior( source, 0, 2156.314453125, 942.9453125, 10.8203125 ) end addEventHandler( "onMarkerHit", ammunationout, gunshopAOUT ) addEventHandler( "onMarkerHit", ammunationin, gunshopAIN ) function showGui( player ) triggerClientEvent( player, "onHit", root ) end addEventHandler( "onMarkerHit", theMarker, showGui) -- SELL GUNS FUNCTIONSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS function sellDeagle() giveWeapon( source, 24, 100 ) takePlayerMoney( source, 1000 ) --COST end addEvent( "sellDeagle", true ) addEventHandler( "sellDeagle", getRootElement(), sellDeagle ) function sellM4() giveWeapon( source, 31, 100 ) end addEvent( "sellM4", true ) addEventHandler( "sellM4", getRootElement(), sellM4 ) function sellTec9() giveWeapon( source, 32, 100 ) end addEvent( "sellTec9", true ) addEventHandler( "sellTec9", getRootElement(), sellTec9 ) function sellShotgun() giveWeapon( source, 25, 100 ) end addEvent( "sellShotgun", true ) addEventHandler( "sellShotgun", getRootElement(), sellShotgun ) function sellRifle() giveWeapon( source, 33, 100 ) end addEvent( "sellRifle", true ) addEventHandler( "sellRifle", getRootElement(), sellRifle ) function sellSniper() giveWeapon( source, 34, 100 ) end addEvent( "sellSniper", true ) addEventHandler( "sellSniper", getRootElement(), sellSniper ) function sellColt() giveWeapon( source, 22, 100 ) end addEvent( "sellColt", true ) addEventHandler( "sellColt", getRootElement(), sellColt ) function sellMac10() giveWeapon( source, 28, 100 ) end addEvent( "sellMac10", true ) addEventHandler( "sellMac10", getRootElement(), sellMac10 ) function sellAK47() giveWeapon( source, 30, 100 ) end addEvent( "sellAK47", true ) addEventHandler( "sellAK47", getRootElement(), sellAK47 ) Client function startUp ( ) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Window[1] = guiCreateWindow(463,170,437,246,"",false) guiSetAlpha(GUIEditor_Window[1],1) sellDeagle = guiCreateButton(16,37,112,47,"Desert Eagle",false,GUIEditor_Window[1]) guiSetAlpha(sellDeagle,1) sellM4 = guiCreateButton(16,94,112,47,"M4",false,GUIEditor_Window[1]) guiSetAlpha(sellM4,1) sellTec9 = guiCreateButton(16,152,112,47,"Tec9",false,GUIEditor_Window[1]) guiSetAlpha(sellTec9,1) sellShotgun = guiCreateButton(162,152,112,47,"Shotgun",false,GUIEditor_Window[1]) guiSetAlpha(sellShotgun,1) sellRifle = guiCreateButton(162,94,112,47,"Rifle",false,GUIEditor_Window[1]) guiSetAlpha(sellRifle,1) sellSniper = guiCreateButton(162,36,112,47,"Sniper Rifle",false,GUIEditor_Window[1]) guiSetAlpha(sellSniper,1) sellColt = guiCreateButton(304,94,112,47,"Colt 45.",false,GUIEditor_Window[1]) guiSetAlpha(sellColt,1) sellMac10 = guiCreateButton(304,152,112,47,"Mac-10",false,GUIEditor_Window[1]) guiSetAlpha(sellMac10,1) sellAK47 = guiCreateButton(304,34,112,47,"AK47",false,GUIEditor_Window[1]) guiSetAlpha(sellAK47,1) guiSetVisible ( GUIEditor_Window[1], false ) end addEventHandler ( "onClientResourceStart", resourceRoot, startUp ) addEvent( "onHit", true ) function openGui() guiSetVisible( GUIEditor_Window[1], true ) showCursor( true, true ) end addEventHandler( "onHit", getResourceRootElement(getThisResource()), openGui ) addEventHandler( "onClientGUIClick", root, function( button, state, absoluteX, absoluteY ) guiSetVisible( GUIEditor_Window[1], false ) showCursor( false, false ) if ( source == sellDeagle ) then triggerServerEvent( "sellDeagle", localPlayer ) elseif ( source == sellM4 ) then triggerServerEvent( "sellM4", localPlayer ) elseif ( source == sellTec9 ) then triggerServerEvent( "sellTec9", localPlayer ) elseif ( source == sellShotgun ) then triggerServerEvent( "sellShotgun", localPlayer ) elseif ( source == sellRifle ) then triggerServerEvent( "sellRifle", localPlayer ) elseif ( source == sellSniper ) then triggerServerEvent( "sellSniper", localPlayer ) elseif ( source == sellColt ) then triggerServerEvent( "sellColt", localPlayer ) elseif ( source == sellMac10 ) then triggerServerEvent( "sellMac10", localPlayer ) elseif ( source == sellAK47 ) then triggerServerEvent( "sellAK47", localPlayer ) end end)
  13. Change this addEventHandler ("onPlayerRespawn", p, unfreeze) to this addEventHandler ("onPlayerSpawn", root, unfreeze)
  14. Modification https://community.multitheftauto.com/ind ... ls&id=5716 DONE
  15. Vision

    Is there

    setAccountPassword
  16. I didn't understand your question
  17. Modification https://community.multitheftauto.com/index.php?p= ... ls&id=5692 DONE
  18. Tenta exports [ "scoreboard" ]:addScoreboardColumn ( "id", 1 ) function setPlayerID(num, source) for k,v in ipairs(getElementsByType("player")) do if getElementData(v,"id") == num then setPlayerID(num+1, source) return 0 end end setElementData(source,"id", num) end function setPlayerID_() setPlayerID(0, source) end addEventHandler("onPlayerLogin", getRootElement(), setPlayerID_) function getPlayerNameFromID(id) for k,v in ipairs(getElementsByType("player")) do if getElementData(v,"id") == id then theName = getPlayerName(v) end end if (not theName) then theName = false end return theName end function getPlayerFromID(id) for k,v in ipairs(getElementsByType("player")) do if getElementData(v,"id") == id then thePlayer = v end end if (not thePlayer) then thePlayer = false end return thePlayer end function getIDFromPlayerName(playerName) theID = getElementData(getPlayerFromName(playerName),"id") if (not theID) then theID = false end return theID end function getIDFromPlayer(player) theID = getElementData(player,"id") if (not theID) then theID = false end return theID end --[[ function setPlayerID() local table_ids_server = {} for i = 1, maxPlayers do table_ids_server[i] = i end for k,v in ipairs(getElementsByType("player")) do if getElementData(v,"id") then table.remove(table_ids_server, getElementData(v,"id")) end end setElementData(source,"id", table_ids_server[1]) end addEventHandler("onPlayerLogin", getRootElement(), setPlayerID)]]
  19. You can use this example: https://wiki.multitheftauto.com/wiki/Scr ... Tutorial_1
×
×
  • Create New...