Jump to content

JanKy

Members
  • Content Count

    62
  • Joined

  • Last visited

Community Reputation

4 Neutral

1 Follower

About JanKy

  • Rank
    Snitch

Details

  • Gang
    Vaggos

Recent Profile Visitors

1,154 profile views
  1. Oh dude. Yes, that solved my problem, but i spent 5 minutes trying to notice what was i doing wrong because the debug script showed me this error "unexpected symbol near ' ", and it was pointing me to this line end) And when i was replying to you i noticed that you inserted ( by mistake i may guess ) a weird invisible character. Anyway, thank you for your kind help ^^ Have a nice day
  2. Hello, i get this error in my script. "ERROR : Server triggered clientside event setTheObjectUnbreakable, but event is not added clientside". It is a base-building script and i have some objects which are by default breakable, so i added a function to make them unbreakable, which looks like this function setTheObjectUnbreakable(object) setObjectBreakable(object,false) end addEvent("setTheObjectUnbreakable",true) addEventHandler("setTheObjectUnbreakable",root,setTheObjectUnbreakable) and then i use the event to the server sided script, when an object is created function createB
  3. Oh, damn, thank you ^^. Here's how i did it. function onPlayerQuit ( ) local playeraccount = getPlayerAccount(source) setAccountData ( playeraccount, "dayzteam", getElementData(source,"gang") ) setAccountData ( playeraccount, "dayzrank", getElementData(source,"gang_leader") ) end function onPlayerLogin (_, playeraccount ) if ( playeraccount ) then local oldTeam = getAccountData ( playeraccount, "dayzteam") local oldRank = getAccountData ( playeraccount, "dayzrank") setElementData(source,"gang",oldTeam) setElementData(source,"gang_leader",oldRank) end end addEventHandler
  4. Hello, and sorry for asking so many questions. ( Yeah, i feel bad for making so many mistakes ) But i am trying to save a player's team name and rank in that team, before quiting, and load it back up when he joins. Here's my try : function saveBeforeQuit () oldTeam = getElementData(thePlayer,"gang"); idkrang = getElementData(thePlayer,"gang_leader"); end addEventHandler ( "onPlayerQuit", root, saveBeforeQuit) function loadOnJoin () if oldTeam ~= "None" and getElementData(thePlayer,"gang") ~= "None" then setElementData(thePlayer,"gang",oldTeam) setElementData(thePlayer,"g
  5. Oh, damn. Thank you, all of you. Sometimes i don't see these "little" things. Problem solved ^^
  6. Absolutely no error in the debugscript. It is server sided, and all looks right. I changed the timer from "1000" which is a second to "100" ( which i believe it's the minimum ) and it almost works, but still flickers. But i don't think this is the right thing to do, tho'.
  7. I got the same thing but it flashes faster than in my video. I want it to be transparent continuously, not flickering or something.
  8. So, i've been working on this resource, and i want it to do the following thing : when a player wears a ghillie suit and stands still for 3 seconds, his player model goes a little bit transparent, like "blending with the environment". Here is the code : Client Side : function getPlayerStance () currentskin = getElementData (localPlayer, "skin") if currentskin == 285 then if getPedMoveState (localPlayer) == "stand" or getPedMoveState (localPlayer) == "crouch" then triggerServerEvent ("onPlayerGhillieStateOn", localPlayer) else triggerServerEvent ("onPlayerGhillie
  9. Thank you very much. It solved my problem ^^
  10. I know what a boolean is. True or false. But i don't understand how the variable "Radio Device", which changes, because it's a dayz server and that thing is an item and it is a *number*, was converted ( somehow ? ) to a boolean. Here is that specific part of the code. addCommandHandler("radiochat", function(player, _, ...) if (getElementData(player, "Radio Device") >= 1) then for _,v in ipairs(getElementsByType("player")) do if (getElementData(v, "Radio Device") >= 1) then if (getElementData(v, "radiochannel") == getElementData(player, "radiochannel")) then output
  11. JanKy

    Gang Kick

    Solved it, thanks anyway ^^
  12. Hello, How do i remove non-collidable world objects, especially night lights in buildings, such as this one? By the way, i know the object is either burgershotneon, or burgershotneon02. I tried adding this code in server-side ( i believe that is correct ) but no effect. removeWorldModel(7944,1000,2474,2020,13) removeWorldModel(7943,1000,2474,2020,13) And also, i knew there existed a resource which remove all these types of objects. But i forgot to download it, and also forgot its name. Does anyone know it?
  13. JanKy

    Gang Kick

    I don't think i need to add an element data. I mean, my only question for you all i why does this work if (intention == "leave") then local team = getPlayerGang(client); local rank = getPlayerGangRank(client); if (rank == "Sub Leader") then dbExec(db, "UPDATE `teams` SET `subleader`=? WHERE `name`='"..team.."'", ""); end outputTeamChat(getPlayerName(client).." left the team.", team); removeElementData(client, "gang"); removeElementData(client, "gang.rank"); local acc = getPlayerAccount(client); setAccountData(acc, "gang", nil); dbExec(db, "DELETE FROM `team_acc
  14. JanKy

    Gang Kick

    So, i did this elseif (intention == "kick") then for _,acc in ipairs(getAccounts()) do local accName = getAccountName(acc); if (accName == player) then local accRank = getAccountGangRank(accName); if (accRank ~= "Sub Leader") then if (accRank ~= "Leader") then outputTeamChat(player.." was kicked from the team by #ffffff"..getPlayerName(client), team); removeElementData(player, "gang"); removeElementData(player, "gang.rank"); local accp = getPlayerAccount(player); setAccountData(accp, "gang", nil); dbExec(db, "DELETE FROM `team_acc`
×
×
  • Create New...