Jump to content

marty000123

Members
  • Posts

    256
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by marty000123

  1. Let me check. Edit: I'm not sure what you mean. I see this is a DayZ (looking at the ''blood) script, and I'm not so familiar with that. I may be able to fix it but you'll have to tell me what you exactly want. (Because the blood is already on 9999999999999999 so I don't see an issue...)
  2. Not sure where u base that on, but here's my version. I made it so it saves ur current skin when you /duty, and when you /offaduty you get your old skin back. It works for me, I hope it works for u too function aduty ( player ) local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup ( "user." ..accName, aclGetGroup ( "Admin") ) then local saveskin = getPlayerSkin ( player ) setElementData(player, "saveskin", saveskin) outputChatBox(" Administrator "..getPlayerName(player).." Is Now OnDuty!",getRootElement(),255,0,0) outputChatBox("",getRootElement(),255,0,0) outputServerLog(" Administrator "..getPlayerName(player).." Is Now OnDuty") setElementData( player, "blood", 99999999999999999999999999 ) heal = "9999999999999999999999999999999" setPlayerSkin(player, 217) end end addCommandHandler("duty",aduty) function offaduty ( player ) local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup ( "user." ..accName, aclGetGroup ( "Admin") ) then outputChatBox(" Administrator "..getPlayerName(player).." Is No Longer OnDuty",getRootElement(),255,0,0) outputChatBox("",getRootElement(),255,0,0) outputServerLog(" Administrator "..getPlayerName(player).." Is No Longer OnDuty") setElementData( player, "blood", 12000 ) if getElementData(player, "saveskin", saveskin) then local skin = getElementData(player, "saveskin", saveskin) setPlayerSkin(player, skin) setElementData(player, "saveskin", false) end end end addCommandHandler("offaduty",offaduty) function heal_func ( player ) local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup ( "user." ..accName, aclGetGroup ( "Admin") ) then if heal == "an" then setElementData( player, "food", 250 ) setElementData( player, "thirst", 250 ) end end end setTimer(heal_func, 60000, 0)
  3. Maybe you should put a zombie limit.
  4. You mean that when you're not in a clan, you'll have the CJ skin and when you're in a clan you'll get the clan skin?
  5. Why do you handle money with setElementData?
  6. try this function addTag(player) if getTeamName(getPlayerTeam(player)) == "**Militar**" then aclGroupAddObject(aclGetGroup("Militar"), "user."..getAccountName(getPlayerAccount(player))) end end addEventHandler("onPlayerSpawn", getElementData(), addTag) function removeTag(player) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Militar" ) ) then aclGroupRemoveObject(aclGetGroup("Militar"), "user."..getAccountName(getPlayerAccount(player))) end end addEventHandler("onPlayerWasted", getElementData(), removeTag) addEventHandler("onPlayerQuit", getElementData(), removeTag)
  7. As Noki said, be lucky! Ofcourse, adding some nice and good scripts always helps. Myself, I got very lucky in the zombie server branche. Being successful in freeroam or RP servers seem to be quite hard.
  8. Hello function zombieChange() local timehour, timeminute = getTime() if timehour == 12 then outputChatBox( "works", player, 255, 0, 255 ) end end It doesn't work. Help would be appreciated. It basically needs to put out ''works'' when it's 12:00 ingame time. But I think that was already clear
  9. Shouldn't you work with get/setElementData?
  10. That worked man, thanks alot. But why does it need to be ''source'' instead of ''player''? Like, the getElementData and setElementData needs to refer to the player, right? And when is source/player used?
  11. or press P ingame Resources Manages ACL Group --> Admin Add Object ''resource.eventpanel'' ''resource.house_system''
  12. Maybe you have to give the resources admin permissions in your ACL?
  13. An advanced customizable server tutorial script!
  14. function makePlayerZombie() if isPlayerInTeam(player, "Infected") then outputChatBox("You spawned as a zombie, so you do not have to be afraid for other zombies anymore!", player, 255, 0, 0) setElementData (player,'zombie',true) else return false end end addEventHandler('onPlayerSpawn', getRootElement(), makePlayerZombie) function removePlayerZombie() if getElementData (source,'zombie',true) then setElementData (player,'zombie',false) end end addEventHandler('onPlayerWasted', getRootElement(), removePlayerZombie) [2016-12-28 08:46:58] ERROR: playerzombie\server.lua:2: attempt to call global 'isPlayerInTeam' (a nil value)[code] I have no idea how to call since I've never done it before and the wiki isn't really making it clear for me.. And uh, I don't know how to properly make that LUA code on the forum.
  15. I use this script to make the player who spawns as the ''Infected'' team a zombie. --serverside????? function makePlayerZombie() if getPlayerTeam == Infected then setElementData (player,'zombie',true) else return false end end addEventHandler('onPlayerSpawn', getRootElement(), makePlayerZombie) function removePlayerZombie() if getElementData (player,'zombie',true) then setElementData (player,'zombie',false) end end addEventHandler('onPlayerWasted', getRootElement(), removePlayerZombie) But zombies still attack the players. I have tried doing this on a ped with setElementData(ped,'zombie',true), and he acted like a zombie and zombies didn't attack him. This should work, but why doesn't it work? Also, this error has been given. It shows when a player in the ''Infected'' team dies. Error: WARNING: playerzombie\server.lua:10: Bad argument @ 'getElementData' [Expected element at argument 1, got nil] Any solution?
  16. I gave you step-by-step instructions.. Please tell me what part of it you don't understand.
  17. If I were you, I would wait for it to come back. For me and probably everyone else, it's not working either, nor do I see any offline copies. Patience
  18. For me the wiki doesn't work as well. Anyway, what you should do is something like this: (this one is client sided) function disableWeaponSounds() SetWorldSoundEnabled(group,value,false) --group and value should be changed. more lines can be added! end AddEventHandler (onClientPlayerLogin,getRootElement(),disableWeaponSounds) --the sounds will be disabled when a player joins the server permanently AddEventHandler (onClientResourceStart,getRootElement(),disableWeaponSounds) --this will have immediate effect for everyone(not required) The group and value can be found if you enable Development Mode in your server. To do this, you must create a resource to enable devmode. Something like this: (this one is server sided) function devmodeon() setDevelopmentMode(true) end addCommandHandler("devmodeon", getRootElement(), devmodeon) function devmodeoff() setDevelopmentMode(false) end addCommandHandler("devmodeoff", getRootElement(), devmodeoff) Then run the devmode script. Then type /devmodeon. Then type /debugscript 3. Then type /showsound 1. (in this order) From that moment, you will see every sound you hear or your server produces (not really sure about that one) in the debugscript. It will show what group and value the sounds are in, so if you for example shoot your M4, you'll see ''group: 5, value: 21'' etc. Then you replace the ''(group,value,false) with (5,21,false) etc. Afterwards you can do /debugscript 0 and /showsound 0 (important). If you want to turn off the development mode, you can type ''/devmodeoff''. (i've done this whole thing a few days ago. i could supply u with the script, but idk what gun sounds u need to be disabled and i want u to try it on ur own first) Let me know if it worked. Good luck - Marty
  19. Nevermind, someone fixed it
×
×
  • Create New...