Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Is this a joke?
  2. What exactly doesn't work?
  3. There isn't, also this is really easy to make, but i won't do it because i want you to learn it by yourself
  4. Are you stu*** or what? do you even know the Scripting basics? it's obiously that you must change it... setTeamFriendlyFire(teamElement, false) https://wiki.multitheftauto.com/wiki/Scr ... troduction
  5. I hate lazy people, but you can go to this website and search there. https://community.multitheftauto.com/
  6. I fixed the server side part, since i'm busy right now, i can't check the client side part.
  7. Volk-rus, please don't TRIPLE post! wait for someone else to answer.
  8. Castillo

    Respawn

    Not you, lol. I meant this: "And one thing for Solidsnake14: Hello you remeber my ped topic? u said for no one give me the code now i don't asked for code i only need a help with setTimer and look the other topic they come and post and now u cant say i asked for code ;D Cya!"
  9. function outbreak() -- "source" is the player event. local account = getPlayerAccount(source) if (account) then local doob = getAccountData( source, "Experience:" ) local doob2 = getAccountData( source, "Level:") if (doob) then setElementData ( source, "Experience:", doob ) setElementData ( source, "Level:", doob2 ) else setElementData ( source, "Experience:", 0 ) setElementData ( source, "Level:", 0 ) end end end addEventHandler("onPlayerLogin", getRootElement(), outbreak) function quit() -- "source" is the player event. local account = getPlayerAccount(source) if (account) then local Experience = getElementData(source,"Experience:") local Level = getElementData(source,"Level:",Level) setAccountData(source,"Experience:", Experience) setAccountData (source,"Level:",Level) end end addEventHandler("onPlayerQuit", getRootElement(),quit) function levelup() local XP = getElementData(source,"Experience:") if XP == 25 then setElementData ( source, "Level:", 2) outputChatBox ( source, "You Are Now Level 2!", source,0,255,0) end if XP == 75 then setElementData ( source, "Level:", 3) outputChatBox ( source, "You Are Now Level 3!", 0,255,0) end if XP == 150 then setElementData ( source, "Level:", 4) outputChatBox ( source, "You Are Now Level 4!",source, 0,255,0) end if XP == 300 then setElementData ( source, "Level:", 5) outputChatBox ( source, "You Are Now Level 5!",source, 0,255,0) end if XP == 425 then setElementData ( source, "Level:", 6) outputChatBox ( source, "You Are Now Level 6!",source, 0,255,0) end if XP == 650 then setElementData ( source, "Level:", 7) outputChatBox ( source, "You Are Now Level 7!",source,0,255,0) end end addEventHandler("onElementDataChange",getRootElement(),levelup) function deanimated (ammo, attacker, weapon, bodypart) if (attacker) then if (getElementType ( attacker ) == "player") and (getElementType ( source ) == "ped") then if (getElementData (source, "zombie") == true) then local XP = getElementData ( attacker, "Experience:" ) if XP ~= false then setElementData ( attacker, "Experience:", XP+math.random(2,5)) else setElementData ( attacker, "Experience:", 1 ) end end end end end addEventHandler("onPedWasted", resourceRoot, deanimated)
  10. Well, i had it done by my own way (less code) working, didn't wanted to post it because i wanted to leave you to fix it yourself.
  11. Castillo

    Respawn

    I don't get what do you mean, explain yourself.
  12. Notepad++ ftw, but yeah maybe for begginers, MTA script editor .
  13. use the event handler onElementDataChange?
  14. Castillo

    Respawn

    I think would be easier to make a table with the valid skin ids and then randomize from there
  15. Is this code client side? because setPedControlState works only client side if i'm right.
  16. I don't understand you, are you using Map editor or?
  17. I don't understand you, you want to execute that mysql function for all online players? if so use: addEvent("blabla", true) addEventHandler("blabla", getRootElement(), function() for i,v in pairs(getElementsByType("player")) do playername = getPlayerName(v) local Save = "UPDATE players SET Function='1' WHERE username='" .. tostring(playername) .."'" mysql_query(sqllogin, Save) end end)
  18. Acitano, your post is not needed, you already know it's solved.
  19. If you won't be kicked, you must disable that anti cheat part at mtaserver.conf (i forgot which number was the AC for this)
  20. This script has been stolen from my "c-panel" resource, any admin remove it please. https://community.multitheftauto.com/ind ... ls&id=1862
  21. Castillo

    Minimap

    Any errors? /debugscript 3 in game
  22. Server launcher? you can start a server opening MTA Server.exe.
  23. No as far as i know.
  24. Yeah, i guess so.
×
×
  • Create New...