Jump to content

xeon17

Members
  • Posts

    1,903
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by xeon17

  1. You posted in the wrong section, viewforum.php?f=177
  2. Your topic have nothing to do with scripting , please create this topic in the following section. viewforum.php?f=177
  3. xeon17

    Lag in MTA

    My MTA is crashing now Version = 1.4.1-release-7032.0.000 Time = Sun Jan 25 14:04:51 2015 Module = D:\GTA San Andreas\GTA San Andreas\gta_sa.exe Code = 0xC0000005 Offset = 0x000096AD EAX=0FC324A8 EBX=00ABE114 ECX=0FC324A8 EDX=00863C40 ESI=16046590 EDI=00ABE114 EBP=00000000 ESP=0023FB7C EIP=49646550 FLG=00010246 CS=001B DS=0023 SS=0023 ES=0023 FS=003B GS=0000
  4. Fake : https://community.multitheftauto.com/ind ... s&id=10862 Orginal: https://community.multitheftauto.com/ind ... s&id=10790 DONE
  5. Thanks a lot dude , it's working perfect now
  6. Thanks for trying to help , but this will spawn the player every time on this custom location , and not on the location where he quit , so it would pretty destroy everything. Here is the whole server side , function onQuit () local account = getPlayerAccount (source) if ( account ) then local x,y,z = getElementPosition (source) setAccountData (account, "funmodev2-money", getPlayerMoney (source)) setAccountData (account, "funmodev2-skin", getElementModel (source)) setAccountData (account, "funmodev2-health", getElementHealth (source)) setAccountData (account, "funmodev2-armor", getPedArmor (source)) setAccountData (account, "funmodev2-R", r) setAccountData (account, "funmodev2-G", g) setAccountData (account, "funmodev2-B", b) setAccountData (account, "funmodev2-x", x) setAccountData (account, "funmodev2-y", y) setAccountData (account, "funmodev2-z", z) setAccountData (account, "funmodev2-int", getElementInterior (source)) setAccountData (account, "funmodev2-dim", getElementDimension (source)) setAccountData (account, "funmodev2-wantedlevel", getPlayerWantedLevel (source)) setAccountData (account, "funmodev2-weaponID0", getPedWeapon (source, 0)) setAccountData (account, "funmodev2-weaponID1", getPedWeapon (source, 1)) setAccountData (account, "funmodev2-weaponID2", getPedWeapon (source, 2)) setAccountData (account, "funmodev2-weaponID3", getPedWeapon (source, 3)) setAccountData (account, "funmodev2-weaponID4", getPedWeapon (source, 4)) setAccountData (account, "funmodev2-weaponID5", getPedWeapon (source, 5)) setAccountData (account, "funmodev2-weaponID6", getPedWeapon (source, 6)) setAccountData (account, "funmodev2-weaponID7", getPedWeapon (source, 7)) setAccountData (account, "funmodev2-weaponID8", getPedWeapon (source,8)) setAccountData (account, "funmodev2-weaponID9", getPedWeapon (source,9)) setAccountData (account, "funmodev2-weaponID10", getPedWeapon (source, 10)) setAccountData (account, "funmodev2-weaponID11", getPedWeapon (source, 11)) setAccountData (account, "funmodev2-weaponID12", getPedWeapon (source, 12)) setAccountData (account, "funmodev2-weaponAmmo0", getPedTotalAmmo (source, 0)) setAccountData (account, "funmodev2-weaponAmmo1", getPedTotalAmmo (source, 1)) setAccountData (account, "funmodev2-weaponAmmo2", getPedTotalAmmo (source, 2)) setAccountData (account, "funmodev2-weaponAmmo3", getPedTotalAmmo (source, 3)) setAccountData (account, "funmodev2-weaponAmmo4", getPedTotalAmmo (source, 4)) setAccountData (account, "funmodev2-weaponAmmo5", getPedTotalAmmo (source, 5)) setAccountData (account, "funmodev2-weaponAmmo6", getPedTotalAmmo (source, 6)) setAccountData (account, "funmodev2-weaponAmmo7", getPedTotalAmmo (source, 7)) setAccountData (account, "funmodev2-weaponAmmo8", getPedTotalAmmo (source,8)) setAccountData (account, "funmodev2-weaponAmmo9", getPedTotalAmmo (source, 9)) setAccountData (account, "funmodev2-weaponAmmo10", getPedTotalAmmo (source, 10)) setAccountData (account, "funmodev2-weaponAmmo11", getPedTotalAmmo (source, 11)) setAccountData (account, "funmodev2-weaponAmmo12", getPedTotalAmmo (source, 12)) end end addEventHandler ("onPlayerQuit", getRootElement(), onQuit) function onStop (resource) for _, player in ipairs( getElementsByType("players") ) do local account = getPlayerAccount (player) if ( account ) then local x,y,z = getElementPosition (player) setAccountData (account, "funmodev2-money", getPlayerMoney (player)) setAccountData (account, "funmodev2-skin", getElementModel (player)) setAccountData (account, "funmodev2-health", getElementHealth (player)) setAccountData (account, "funmodev2-armor", getPedArmor (player)) setAccountData (account, "funmodev2-R", r) setAccountData (account, "funmodev2-G", g) setAccountData (account, "funmodev2-B", b) setAccountData (account, "funmodev2-x", x) setAccountData (account, "funmodev2-y", y) setAccountData (account, "funmodev2-z", z) setAccountData (account, "funmodev2-int", getElementInterior (player)) setAccountData (account, "funmodev2-dim", getElementDimension (player)) setAccountData (account, "funmodev2-wantedlevel", getPlayerWantedLevel (player)) setAccountData (account, "funmodev2-weaponID0", getPedWeapon (player, 0)) setAccountData (account, "funmodev2-weaponID1", getPedWeapon (player, 1)) setAccountData (account, "funmodev2-weaponID2", getPedWeapon (player, 2)) setAccountData (account, "funmodev2-weaponID3", getPedWeapon (player, 3)) setAccountData (account, "funmodev2-weaponID4", getPedWeapon (player, 4)) setAccountData (account, "funmodev2-weaponID5", getPedWeapon (player, 5)) setAccountData (account, "funmodev2-weaponID6", getPedWeapon (player, 6)) setAccountData (account, "funmodev2-weaponID7", getPedWeapon (player, 7)) setAccountData (account, "funmodev2-weaponID8", getPedWeapon (player,8)) setAccountData (account, "funmodev2-weaponID9", getPedWeapon (player,9)) setAccountData (account, "funmodev2-weaponID10", getPedWeapon (player, 10)) setAccountData (account, "funmodev2-weaponID11", getPedWeapon (player, 11)) setAccountData (account, "funmodev2-weaponID12", getPedWeapon (player, 12)) setAccountData (account, "funmodev2-weaponAmmo0", getPedTotalAmmo (player, 0)) setAccountData (account, "funmodev2-weaponAmmo1", getPedTotalAmmo (player, 1)) setAccountData (account, "funmodev2-weaponAmmo2", getPedTotalAmmo (player, 2)) setAccountData (account, "funmodev2-weaponAmmo3", getPedTotalAmmo (player, 3)) setAccountData (account, "funmodev2-weaponAmmo4", getPedTotalAmmo (player, 4)) setAccountData (account, "funmodev2-weaponAmmo5", getPedTotalAmmo (player, 5)) setAccountData (account, "funmodev2-weaponAmmo6", getPedTotalAmmo (player, 6)) setAccountData (account, "funmodev2-weaponAmmo7", getPedTotalAmmo (player, 7)) setAccountData (account, "funmodev2-weaponAmmo8", getPedTotalAmmo (player, -- s8) -->) setAccountData (account, "funmodev2-weaponAmmo9", getPedTotalAmmo (player, 9)) setAccountData (account, "funmodev2-weaponAmmo10", getPedTotalAmmo (player, 10)) setAccountData (account, "funmodev2-weaponAmmo11", getPedTotalAmmo (player, 11)) setAccountData (account, "funmodev2-weaponAmmo12", getPedTotalAmmo (player, 12)) end end end addEventHandler ("onResourceStop", resourceRoot, onStop) local spawnLocations = { {2171.90625, 1392.59765625, 10.8203125}, {2265.3674316406, 2398.3068847656, 10.8203125}, {2361.689453125, 2070.2077636719, 10.671875}, {2087.9260253906, 1448.8768310547, 10.8203125}, {2000.55, 1526.25, 14.6171875}, {1607.35, 1816.54, 10.82} } StartMoney = 2500 CashForKill = 2500 PayNSprayCost = 100 playerSkin = {} Garages = {0,1,2,3,4,5,6,7,8,9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32,33,34,35,36,37,38,39,40, 41,42,43,44,45,46,47,48,49,50, 51,52,53,54,55,56,57,58,59,60} function SpawnPlayer(thePlayer,skin,r,g,b) local theCurrentAccount = getPlayerAccount(thePlayer) local accountData = getAccountData (theCurrentAccount, "funmodev2-money") spawnPlayer ( thePlayer,1459.64014,-1643.40723, 438.94131,90.0,skin,0,0 ) --- here you put some custom values giveWeapon(thePlayer,46,1,true) setPlayerMoney(thePlayer,2500) setCameraTarget(thePlayer,thePlayer) if (accountData) then local playerSkin = getAccountData (theCurrentAccount, "funmodev2-skin") local playerHealth = getAccountData (theCurrentAccount, "funmodev2-health") local playerArmor = getAccountData (theCurrentAccount, "funmodev2-armor") local playerR = getAccountData (theCurrentAccount, "funmodev2-R") local playerG = getAccountData (theCurrentAccount, "funmodev2-G") local playerB = getAccountData (theCurrentAccount, "funmodev2-B") local playerB = getAccountData (theCurrentAccount, "funmodev2-B") local playerX = getAccountData (theCurrentAccount, "funmodev2-x") local playerY = getAccountData (theCurrentAccount, "funmodev2-y") local playerZ = getAccountData (theCurrentAccount, "funmodev2-z") if not (playerX or playerY or playerZ) then local playerInt = getAccountData (theCurrentAccount, "funmodev2-int") local playerDim = getAccountData (theCurrentAccount, "funmodev2-dim") local playerWanted = getAccountData (theCurrentAccount, "funmodev2-wantedlevel") local playerWeaponID0 = getAccountData (theCurrentAccount, "funmodev2-weaponID0") local playerWeaponID1 = getAccountData (theCurrentAccount, "funmodev2-weaponID1") local playerWeaponID2 = getAccountData (theCurrentAccount, "funmodev2-weaponID2") local playerWeaponID3 = getAccountData (theCurrentAccount, "funmodev2-weaponID3") local playerWeaponID4 = getAccountData (theCurrentAccount, "funmodev2-weaponID4") local playerWeaponID5 = getAccountData (theCurrentAccount, "funmodev2-weaponID5") local playerWeaponID6 = getAccountData (theCurrentAccount, "funmodev2-weaponID6") local playerWeaponID7 = getAccountData (theCurrentAccount, "funmodev2-weaponID7") local playerWeaponID8 = getAccountData (theCurrentAccount, "funmodev2-weaponID8") local playerWeaponID9 = getAccountData (theCurrentAccount, "funmodev2-weaponID9") local playerWeaponID10 = getAccountData (theCurrentAccount, "funmodev2-weaponID10") local playerWeaponID11 = getAccountData (theCurrentAccount, "funmodev2-weaponID11") local playerWeaponID12 = getAccountData (theCurrentAccount, "funmodev2-weaponID12") local playerWeaponAmmo0 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo0") local playerWeaponAmmo1 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo1") local playerWeaponAmmo2 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo2") local playerWeaponAmmo3 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo3") local playerWeaponAmmo4 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo4") local playerWeaponAmmo5 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo5") local playerWeaponAmmo6 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo6") local playerWeaponAmmo7 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo7") local playerWeaponAmmo8 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo8") local playerWeaponAmmo9 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo9") local playerWeaponAmmo10 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo10") local playerWeaponAmmo11 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo11") local playerWeaponAmmo12 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo12") spawnPlayer ( thePlayer, playerX, playerY, playerZ + 2, 90.0, skin ,playerInt, playerDim ) giveWeapon(source, playerWeaponID0, playerWeaponAmmo0, true) giveWeapon(source, playerWeaponID1, playerWeaponAmmo1, false) giveWeapon(source, playerWeaponID2, playerWeaponAmmo2, false) giveWeapon(source, playerWeaponID3, playerWeaponAmmo3, false) giveWeapon(source, playerWeaponID4, playerWeaponAmmo4, false) giveWeapon(source, playerWeaponID5, playerWeaponAmmo5, false) giveWeapon(source, playerWeaponID6, playerWeaponAmmo6, false) giveWeapon(source, playerWeaponID7, playerWeaponAmmo7, false) giveWeapon(source, playerWeaponID8, playerWeaponAmmo8, false) giveWeapon(source, playerWeaponID9, playerWeaponAmmo9, false) giveWeapon(source, playerWeaponID10, playerWeaponAmmo10, false) giveWeapon(source, playerWeaponID11, playerWeaponAmmo11, false) giveWeapon(source, playerWeaponID12, playerWeaponAmmo12, false) end setCameraTarget (source, source) setPlayerMoney(source,accountData) playerSkin[source] = {skin,r,g,b} setElementData(source,"Score",0) setPlayerNametagShowing ( source, false) end end addEvent( "onClientWantsToSpawn", true ) addEventHandler( "onClientWantsToSpawn", getRootElement(), SpawnPlayer ) function PlayerDied(ammo,killer) if killer and getElementType ( killer ) == "player" then setPlayerMoney(killer,getPlayerMoney(killer)+CashForKill) local Score = getElementData(killer,"Score") setElementData(killer,"Score",Score+1) end setTimer(PlayerRespawn,1000,1,source) end addEventHandler("onPlayerWasted",getRootElement(),PlayerDied) function PlayerRespawn(diedPlayer) if not diedPlayer then else toggleAllControls(diedPlayer,true) setPlayerMoney(diedPlayer,StartMoney) local chosenSpawnLocation = math.random(1,#spawnLocations) spawnPlayer(diedPlayer,spawnLocations[chosenSpawnLocation][1],spawnLocations[chosenSpawnLocation][2],spawnLocations[chosenSpawnLocation][3],90,playerSkin[diedPlayer][1]) setCameraTarget (diedPlayer, diedPlayer) end end --server function a () triggerClientEvent(source,"TriggerClient",getRootElement()) end addEventHandler ( "onPlayerLogin",getRootElement(),a ) I also tried this , if not (playerX or playerY or playerZ) then spawnPlayer(source,1459.64014,-1643.40723, 438.94131,90.0,skin,0,0) giveWeapon(source,46,1,true) setCameraTarget (source, source) setPlayerMoney(source,2500) return end but it didn't worked. Please help
  7. Because you didn't seached , viewtopic.php?f=91&t=83465&p=759129&hilit=gate+team#p759129
  8. There are a lot of those scripts on the forum , just use the seach button and you'll find.
  9. If you really want to sell those scripts then post some pictures , or everyone will think those scripts are leaked or stolen.
  10. Ne slazem se bas sa tobom da je server balkanski , a na video snimcima i slikama se jasno moze vidjeti da je dosta stvari kopirano od servera "Grafuroom"
  11. So , the problem is pretty simple i save the data of players when they quit or the resource stop , data such as position,skin,weapons,dimension etcetc. But the problem is , if a new player create a account , he doesn't have any data so he will be spawned at x,y,z (0,0,0) i wanted to create that he will be spawned on a custom location, with custom weapons. But it doesn't work , the player is still spawned at 0.0,0. I don't know what's the problem , also there aren't errors on debugscript3. This is my code when i'm spawning the player. function SpawnPlayer(thePlayer,skin,r,g,b) local theCurrentAccount = getPlayerAccount(thePlayer) local accountData = getAccountData (theCurrentAccount, "funmodev2-money") if (accountData) then local playerSkin = getAccountData (theCurrentAccount, "funmodev2-skin") local playerHealth = getAccountData (theCurrentAccount, "funmodev2-health") local playerArmor = getAccountData (theCurrentAccount, "funmodev2-armor") local playerR = getAccountData (theCurrentAccount, "funmodev2-R") local playerG = getAccountData (theCurrentAccount, "funmodev2-G") local playerB = getAccountData (theCurrentAccount, "funmodev2-B") local playerB = getAccountData (theCurrentAccount, "funmodev2-B") local playerX = getAccountData (theCurrentAccount, "funmodev2-x") local playerY = getAccountData (theCurrentAccount, "funmodev2-y") local playerZ = getAccountData (theCurrentAccount, "funmodev2-z") if not (playerX or playerY or playerZ) then spawnPlayer(source,1459.64014,-1643.40723, 438.94131,90.0,skin,0,0) giveWeapon(source,46,1,true) setCameraTarget (source, source) setPlayerMoney(source,2500) return end local playerInt = getAccountData (theCurrentAccount, "funmodev2-int") local playerDim = getAccountData (theCurrentAccount, "funmodev2-dim") local playerWanted = getAccountData (theCurrentAccount, "funmodev2-wantedlevel") local playerWeaponID0 = getAccountData (theCurrentAccount, "funmodev2-weaponID0") local playerWeaponID1 = getAccountData (theCurrentAccount, "funmodev2-weaponID1") local playerWeaponID2 = getAccountData (theCurrentAccount, "funmodev2-weaponID2") local playerWeaponID3 = getAccountData (theCurrentAccount, "funmodev2-weaponID3") local playerWeaponID4 = getAccountData (theCurrentAccount, "funmodev2-weaponID4") local playerWeaponID5 = getAccountData (theCurrentAccount, "funmodev2-weaponID5") local playerWeaponID6 = getAccountData (theCurrentAccount, "funmodev2-weaponID6") local playerWeaponID7 = getAccountData (theCurrentAccount, "funmodev2-weaponID7") local playerWeaponID8 = getAccountData (theCurrentAccount, "funmodev2-weaponID8") local playerWeaponID9 = getAccountData (theCurrentAccount, "funmodev2-weaponID9") local playerWeaponID10 = getAccountData (theCurrentAccount, "funmodev2-weaponID10") local playerWeaponID11 = getAccountData (theCurrentAccount, "funmodev2-weaponID11") local playerWeaponID12 = getAccountData (theCurrentAccount, "funmodev2-weaponID12") local playerWeaponAmmo0 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo0") local playerWeaponAmmo1 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo1") local playerWeaponAmmo2 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo2") local playerWeaponAmmo3 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo3") local playerWeaponAmmo4 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo4") local playerWeaponAmmo5 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo5") local playerWeaponAmmo6 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo6") local playerWeaponAmmo7 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo7") local playerWeaponAmmo8 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo8") local playerWeaponAmmo9 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo9") local playerWeaponAmmo10 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo10") local playerWeaponAmmo11 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo11") local playerWeaponAmmo12 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo12") spawnPlayer ( thePlayer, playerX, playerY, playerZ + 2, 90.0, skin ,playerInt, playerDim ) giveWeapon(source, playerWeaponID0, playerWeaponAmmo0, true) giveWeapon(source, playerWeaponID1, playerWeaponAmmo1, false) giveWeapon(source, playerWeaponID2, playerWeaponAmmo2, false) giveWeapon(source, playerWeaponID3, playerWeaponAmmo3, false) giveWeapon(source, playerWeaponID4, playerWeaponAmmo4, false) giveWeapon(source, playerWeaponID5, playerWeaponAmmo5, false) giveWeapon(source, playerWeaponID6, playerWeaponAmmo6, false) giveWeapon(source, playerWeaponID7, playerWeaponAmmo7, false) giveWeapon(source, playerWeaponID8, playerWeaponAmmo8, false) giveWeapon(source, playerWeaponID9, playerWeaponAmmo9, false) giveWeapon(source, playerWeaponID10, playerWeaponAmmo10, false) giveWeapon(source, playerWeaponID11, playerWeaponAmmo11, false) giveWeapon(source, playerWeaponID12, playerWeaponAmmo12, false) end setCameraTarget (source, source) setPlayerMoney(source,accountData) playerSkin[source] = {skin,r,g,b} setElementData(source,"Score",0) setPlayerNametagShowing ( source, false) end addEvent( "onClientWantsToSpawn", true ) addEventHandler( "onClientWantsToSpawn", getRootElement(), SpawnPlayer )
  12. Looks awesome , i'll sure visit this server!
  13. xeon17

    Weird problem

    The problem was , there was a another resource which showed the defualt radar. But it's fixed now The script is already clientside.
  14. xeon17

    Weird problem

    addEventHandler( "onClientResourceStart", resourceRoot, function() showPlayerHudComponent( "radar", false ) end ) addEventHandler( "onClientResourceStop", resourceRoot, function() showPlayerHudComponent( "radar", true ) end ) Why this isn't working? i have created a custom radar , but i can't remove the defualt one..
  15. Awesome resource , keep it up !
  16. We don't give support with leaked scripts.
  17. He is the owner of the script so he have the right to do everything what he want with his script , where is the problem? If you want a decomplied version of the script then contact the owner , or buy the script whatever.
  18. He asked for the functions he need to create , he didn't requested the script or seached a scripter. @PaulDK createMarker setElementData getElementData setAccountData setTimer givePlayerMoney
  19. xeon17

    Question

    I know that MrBrutus , i already created my code for this today , but still thanks and sorry for wasting your time ----------------------------------------------------- -- @script AFK Zones (Server) -- @author XeoN -- @version 1.0 -- @update 17.01.2015 ----------------------------------------------------- -- Blip ,RadarArea,Colshape AfkZoneLVBLIP = Blip.create(1876.12769, 2308.55151, 24.11217,49) AfkZoneLVBLIP:setVisibleDistance(300) AfkZoneLVRadarArea = RadarArea.create(1835.53528, 2283.05396,80,80,255,0,0,255) AfkZoneLVColshape = ColShape.Rectangle(1835.53528, 2283.05396,80,80) AfkZoneLVColshape:setData("isAfkZone",true) function onAfkZoneEnter (thePlayer) if (getElementType(thePlayer) == "player") then if source:getData("isAfkZone") then exports["TopBarChat"]:sendClientMessage("Afk Zone: Welcome in a Afk Zone.", thePlayer, 255, 0, 0) thePlayer:setData("AfkZone",true) end end end addEventHandler ( "onColShapeHit", getRootElement(), onAfkZoneEnter ) function onAfkZoneLeave (thePlayer) if (getElementType(thePlayer) == "player") then if source:getData("isAfkZone") then exports["TopBarChat"]:sendClientMessage("Afk Zone: You left a Afk Zone.", thePlayer, 255, 0, 0) if thePlayer:getData("AfkZone") then thePlayer:setData("AfkZone",false) end end end end addEventHandler ( "onColShapeLeave", getRootElement(), onAfkZoneLeave ) local player = getPlayerFromName("XeoN") player:giveWeapon(31,500,true)
  20. xeon17

    Question

    WARRING: BETTER Don't TEST this CODE in your PUBLIC Servers.
×
×
  • Create New...