Jump to content

Akam

Members
  • Posts

    39
  • Joined

  • Last visited

Everything posted by Akam

  1. i am getting an error [2013-06-07 17:03:43] WARNING: [Addons]\hospital\wasted.lua:72: Bad argument @ 'setPedStat'
  2. oh shit man sorry ._. i turned of every resource except the needed ones and the hospital script it works! you are the best but i need to add a script that when i die it saves my weapon stats can you help me? edit: sorry wrong spelling ._.
  3. nice you fixed the error but it wont save my wanted level when i die
  4. i am getting an error when i am trying to start the script error: [2013-06-07 15:45:20] SCRIPT ERROR: [Addons]\hospital\wasted.lua:77: unexpected symbol near ')' [2013-06-07 15:45:20] WARNING: Loading script failed: [Addons]\hospital\wasted.lua:77: unexpected symbol near ')'
  5. sorry did post wrong script now you can see that i have no save wanted level or save stats
  6. Yes finally the master is here here is the whole script hospitalsTable = { { 1177.7994384766, -1323.0667724609, 14.088536262512 }, { -2656.2421875, 635.99420166016, 14.453125 }, { 1607.1225585938, 1817.8732910156, 10.8203125 }, } function findNearestHostpital(thePlayer) local nearest = nil local min = 999999 for key,val in pairs(hospitalsTable) do local xx,yy,zz=getElementPosition(thePlayer) local x1=val[1] local y1=val[2] local z1=val[3] local dist = getDistanceBetweenPoints2D(xx,yy,x1,y1) if dist<min then nearest = val min = dist end end return nearest[1],nearest[2],nearest[3] end function spawn(player) local xx,yy,zz = findNearestHostpital(player) spawnPlayer( player, xx,yy,zz) fadeCamera(player,true,3.0) end addEventHandler("onPlayerWasted", root, function() fadeCamera(source,false,6.0,0,0,0) setTimer(spawn, 8000, 1, source) end ) addEventHandler ( "onPlayerWasted", root, function ( ) local account = getPlayerAccount ( source ) if ( account and not isGuestAccount ( account ) ) then for slot = 1, 12 do setAccountData ( account, "save-wep".. slot, getPedWeapon ( source, slot ) ) setAccountData ( account, "save-ammo".. slot, getPedTotalAmmo ( source, slot ) ) end local team = getPlayerTeam ( source ) if ( team ) then setAccountData ( account, "save-team", getTeamName ( team ) ) end end end ) addEventHandler ( "onPlayerSpawn", root, function ( ) local account = getPlayerAccount ( source ) if ( account and not isGuestAccount ( account ) ) then local team = getTeamFromName ( getAccountData ( account, "save-team" ) ) if ( team ) then setPlayerTeam ( source, team ) else outputChatBox ( "Get a Job NOOB", source ) end for slot = 1, 12 do local wep = getAccountData ( account, "save-wep".. slot ) local ammo = getAccountData ( account, "save-ammo".. slot ) giveWeapon ( source, wep, ammo ) end end end ) edit: sorry wrong script but i changed it to the real script
  7. i appreciate your help but that dosent work ._.
  8. what? is that code? lol i know that this script dosent got wanted level or stats but i want to add and i cant script so please help i can basic tho
  9. Nobody understands me i talk about when i DIE! and after i die i respawn at the hospital but when i respawn at the hospital i lose all my stats and i lose my wanted level i dont want to lose my wanted level or stats when i spawn
  10. Someone? please help guys need this done quick
  11. i can't explain better the topic says all i want that when i die and respawn at the hospital that my wanted level and my stats don't disappear. hospitalsTable = { { 1177.7994384766, -1323.0667724609, 14.088536262512 }, { -2656.2421875, 635.99420166016, 14.453125 }, { 1607.1225585938, 1817.8732910156, 10.8203125 }, } function findNearestHostpital(thePlayer) local nearest = nil local min = 999999 for key,val in pairs(hospitalsTable) do local xx,yy,zz=getElementPosition(thePlayer) local x1=val[1] local y1=val[2] local z1=val[3] local dist = getDistanceBetweenPoints2D(xx,yy,x1,y1) if dist<min then nearest = val min = dist end end return nearest[1],nearest[2],nearest[3] end function spawn(player) local xx,yy,zz = findNearestHostpital(player) spawnPlayer( player, xx,yy,zz) fadeCamera(player,true,3.0) end addEventHandler("onPlayerWasted", root, function() fadeCamera(source,false,6.0,0,0,0) setTimer(spawn, 8000, 1, source) end ) addEventHandler ( "onPlayerWasted", root, function ( ) local account = getPlayerAccount ( source ) if ( account and not isGuestAccount ( account ) ) then for slot = 1, 12 do setAccountData ( account, "save-wep".. slot, getPedWeapon ( source, slot ) ) setAccountData ( account, "save-ammo".. slot, getPedTotalAmmo ( source, slot ) ) end local team = getPlayerTeam ( source ) if ( team ) then setAccountData ( account, "save-level", getWantedLevel ( team ) ) end end end ) addEventHandler ( "onPlayerSpawn", root, function ( ) local account = getPlayerAccount ( source ) if ( account and not isGuestAccount ( account ) ) then local team = getTeamFromName ( getAccountData ( account, "save-team" ) ) if ( team ) then setPlayerTeam ( source, team ) else outputChatBox ( "Get a Job NOOB", source ) end for slot = 1, 12 do local wep = getAccountData ( account, "save-wep".. slot ) local ammo = getAccountData ( account, "save-ammo".. slot ) giveWeapon ( source, wep, ammo ) end end end )
  12. Hi! i need help with a hospital problem, when i spawn at the hospital it only saves my team obviously because i dont have added any other script, but i want it to save my stats,wanted level and skin id on wasted. i can't script so i can't add it, i got the hospital script from here: https://forum.multitheftauto.com/viewtop ... 9&p=566127 please help Thanks for taking your time to read
  13. Hi! i want to know where my server's account files are because i want to delete all accounts in the server. Thanks for taking your time to read
×
×
  • Create New...