Jump to content

Tando

Members
  • Posts

    121
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Tando

  1. Tando

    Mask Bug

    Still same problem
  2. Tando

    Mask Bug

    Yes as soxxml said
  3. Tando

    Mask Bug

    maskTable = {} yelekTable = {} maskTable["Devil"] = {1512, 1, 90,100000} maskTable["Vendetta"] = {1455, 1, 90,100000} maskTable["Darth"] = {1484, 1, 90,100000} maskTable["Horse"] = {1485, 1, 90,1450000} maskTable["Gas mask"] = {1487, 1, 90,1450000} maskTable["Cow Bow"] = {1543, 1, 90,1950000} maskTable["Zombie"] = {1544, 1, 90,100000} maskTable["Vampire"] = {1666, 1, 90,950000} maskTable["skull Face"] = {1667, 1, 90,950000} maskTable["Raccoon"] = {1668, 1, 180,100000} maskTable["Owl"] = {1950, 1, 180,950000} maskTable["Cat"] = {1951, 1, 180,1450000} maskTable["Bag"] = {1551, 1, 90,10000} maskTable["Dog"] = {1546, 1, 90,950000} maskTable["Baby"] = {1669, 1, 90,1450000} maskTable["Monster"] = {1853, 1, 90,100000} maskTable["Monster Space"] = {1854, 1, 90,1450000} maskTable["Hate"] = {1855, 1, 180,100000} obje = {} yelek = {} function maske_kaldir() if obje[source] then destroyElement(obje[source]) end end addEvent("removemask",true) addEventHandler("removemask", root, maske_kaldir) function maske_kaldir(pay) local money = getPlayerMoney(source) if (money > tonumber (pay)) then takePlayerMoney (source,(pay)) setElementData (source ,"bought",true) setElementData (localPlayer ,"testing" ,false) else setElementData (localPlayer ,"testing" ,true) outputChatBox (" You dont have Money " ,source ,255,0,0) yelek_kaldir() triggerClientEvent (source, "onGreeting",source ) end end addEvent("cost",true) addEventHandler("cost", root, maske_kaldir) function yelek_kaldir() if yelek[source] then destroyElement(yelek[source]) end end addCommandHandler("destroy", yelek_kaldir) addEvent("removeyelek",true) addEventHandler("removeyelek", root, yelek_kaldir) function maske_ekle(objeid,bodyattach,zROT) obje[source] = createObject ( objeid, 0, 0, 0, 0, 0, 0 ) exports.bone_attach:attachElementToBone(obje[source],source,bodyattach,0,0,-0.61,0,0,zROT) setElementData (source,"masks",objeid) setElementData (source,"bodp",bodyattach) setElementData (source,"rot",zROT) end addEvent("setmask",true) addEventHandler("setmask", root, maske_ekle) function yelek_ekle(name) if yelek[source] then destroyElement(yelek[source]) yelek[source] = nil end local objeid = yelekTable[name][1] local bodyattach = yelekTable[name][2] local zROT = yelekTable[name][3] yelek[source] = createObject ( objeid, 0, 0, 0, 0, 0, 0 ) exports.bone_attach:attachElementToBone(yelek[source],source,3,-0.03,0,-0.55,-0.5,2,90) end addEvent("setyelek",true) addEventHandler("setyelek", root, yelek_ekle) function saveInfo(name) if not getElementData(source, "testing" ) then local account = getPlayerAccount(source) local walking = getElementData(source,"masks") local body = getElementData (source,"body") local rot = getElementData (source,"rot") local bought = getElementData (source,"bought") setAccountData(account,"masks",walking) setAccountData(account,"bodp",body) setAccountData(account,"rot",rot) setAccountData(account,"bought",bought) setElementData(source,"rot",rot) setElementData(source,"masks",walking) setElementData(source,"bodp",body) end end addEventHandler("onPlayerQuit",root,saveInfo) function this (name) if not getElementData(source, "testing" ) then local account = getPlayerAccount(source) local walking = getElementData(source,"masks") local body = getElementData (source,"bodp") local rot = getElementData (source,"rot") setAccountData(account,"masks",walking) setAccountData(account,"bodp",body) setAccountData(account,"rot",rot) setElementData(source,"rot",rot) setElementData(source,"masks",walking) setElementData(source,"bodp",body) end end addEventHandler( "onResourceStop", resourceRoot,this) function displayLoadedRes (name) if not getElementData(source, "testing" ) then local account = getPlayerAccount(source) local walking = getAccountData(account,"masks") local body = getAccountData(account,"bodp") local rot = getAccountData(account,"rot") setElementData(source,"rot",rot) setElementData(source,"masks",walking) setElementData(source,"bodp",body) obje[source] = createObject (walking, 0, 0, 0, 0, 0, 0 ) exports.bone_attach:attachElementToBone(obje[source],source,body,0,0,-0.61,0,0,rot) end end addEventHandler ( "onResourceStart", getRootElement(), displayLoadedRes ) function getInfo(name) if not getElementData(source, "testing" ) then local account = getPlayerAccount(source) local walking = getAccountData(account,"masks") local body = getAccountData(account,"bodp") local rot = getAccountData(account,"rot") setAccountData(account,"masks",walking) setAccountData(account,"bodp",body) setAccountData(account,"rot",rot) setElementData(source,"rot",rot) setElementData(source,"masks",walking) setElementData(source,"bodp",body) obje[source] = createObject (walking, 0, 0, 0, 0, 0, 0 ) exports.bone_attach:attachElementToBone(obje[source],source,body,0,0,-0.61,0,0,rot) end end addEventHandler("onPlayerSpawn",root,getInfo) function getInfo(per,cur,name) if not getElementData(source, "testing" ) then local walking = getAccountData(cur,"masks") local body = getAccountData(cur,"bodp") local rot = getAccountData(cur,"rot") setElementData(source,"rot",rot) setElementData(source,"masks",walking) setElementData(source,"bodp",body) setElementData(source,"loggedin",true) obje[source] = createObject (walking, 0, 0, 0, 0, 0, 0 ) exports.bone_attach:attachElementToBone(obje[source],source,body,0,0,-0.61,0,0,rot) end end addEventHandler("onPlayerWasted",root,getInfo) function itback (name) if not getElementData(source, "testing" ) then end end addCommandHandler ( "reco",itback) function back(name) if not getElementData(source, "testing" ) then local account = getPlayerAccount(source) local walking = getAccountData(account,"masks") local body = getAccountData(account,"bodp") local rot = getAccountData(account,"rot") local bought = getAccountData(account,"bought") setElementData(source,"rot",rot) setElementData(source,"masks",walking) setElementData(source,"bodp",body) setElementData(source,"bought",bought) setElementData(source,"loggedin",true) obje[source] = createObject (walking, 0, 0, 0, 0, 0, 0 ) exports.bone_attach:attachElementToBone(obje[source],source,body,0,0,-0.61,0,0,rot) end end addEventHandler("onPlayerLogin", root,back) when Player recc mask removed !
  4. function MakePlayerHeadshot( attacker, weapon, bodypart, loss ) if getElementType ( attacker ) == "ped" then if bodypart == 9 then triggerEvent( "onPlayerHeadshot", source, attacker, weapon, loss ) setPedHeadless ( source, true ) killPed( source, attacker, weapon, bodypart ) setTimer( BackUp, 900, 1, source ) end end end function MakeHeadshot( source, attacker, weapon, loss ) triggerEvent( "onPlayerHeadshot", source, attacker, weapon, loss ) killPed( source, attacker, weapon, 9 ) setPedHeadless ( source, true ) setTimer( BackUp, 900, 1, source ) end function BackUp( source ) if getElementType ( source ) == "player" then setPedHeadless ( source, false ) end end function outputHeadshotIcon (killer, weapon, bodypart) if bodypart == 9 then cancelEvent() local r2,g2,b2 = getTeamColor ( getPlayerTeam( killer ) ) local r1,g1,b1 = getTeamColor ( getPlayerTeam( source ) ) exports.killmessages:outputMessage ( {getPlayerName(killer),{"padding",width=3},{"icon",id=weapon},{"padding",width=3},{"icon",id=256},{"padding",width=3},{"color",r=r1,g=g1,b=b1},getPlayerName(source) }, getRootElement(),r2,g2,b2) end end addEvent ( "onServerHeadshot", true ) addEventHandler( "onPlayerDamage", getRootElement(), MakePlayerHeadshot ) addEventHandler( "onPlayerKillMessage", getRootElement(), outputHeadshotIcon ) addEventHandler( "onServerHeadshot", getRootElement(), MakeHeadshot ) it's has bug : if player have Armour it's just damge and when damge removed not making head shot it's just damge i need it if player have Armour it's auto removed when player make headshot and when kill player haven't armour make his hp 0 auto
  5. Tando

    Jail Bug

    i tried on PlayQuit / Login but didn't fix can i request u to help me, Please ?
  6. Tando

    Jail Bug

    function jailPlayer(player, jtype, jfrom, jtime, reason, relid) if(isElement(player) and getElementType(player) == "player" and type(jtype) == "number" and isElement(jfrom) and getElementType(jfrom) == "player" and type(jtime) == "number" and jtime > 0 and jtype >= 0 and jtype <= 3) then px, py, pz = getElementPosition(player) if(relid ~= nil) then relid = relid else relid = findNearestPD(player) end if(jtype == 2 or jtype == 1) then jtime = math.floor(jtime) else if(getElementData(player, "viplevel") == 2) then jtime = math.floor(jtime-(jtime*0.1)) elseif(getElementData(player, "viplevel") == 3) then jtime = math.floor(jtime-(jtime*0.25)) elseif(getElementData(player, "viplevel") == 4) then jtime = math.floor(jtime-(jtime*0.5)) else jtime = math.floor(jtime) end end if(getElementData(player, "isInSpawner")) then setElementData(player, "isInSpawner", false) triggerClientEvent(player, "onPlayerLeaveSpawner", player) end if(getElementData(player, "isInOSpawner")) then setElementData(player, "isInOSpawner", false) triggerClientEvent(player, "hideOwnedVehicles", player) end if(isPedInVehicle(player)) then removePedFromVehicle(player) end if(doesPedHaveJetPack(player)) then removePedJetPack(player) end if(law[getTeamName(getPlayerTeam(player))]) then setPlayerTeam(player, getTeamFromName("Unemployed")) setElementData(player, "Job", "Unemployed") setElementData(player, "Job Rank", "None") setElementModel(player, 0) end setElementInterior(player, 0) setElementDimension(player, 33 ) local nm = math.random(#positions) setElementPosition(player, positions[nm][1] or 1573.71, positions[nm][2] or -1641.84,positions[nm][3] or 73.46) setElementData(player, "Jailed", "yes") triggerClientEvent(player, "deleteTurfInfo", player) setElementData(player, "JailTime", jtime) setElementData(player, "JailType", jtype) setElementData(player, "ReleaseID", relid) setElementData(player, "jailFrom",jfrom) triggerClientEvent(player,"onClientPlayerJailed",player,jfrom) triggerEvent("onPlayerJailed",player,jfrom) setPedWeaponSlot(player, 0) toggleControl(player, "fire", false) toggleControl(player, "action", false) toggleControl(player, "next_weapon", false) toggleControl(player, "previous_weapon", false) toggleControl(player, "jump", false) if(jtype == 2 and player ~= jfrom) then if(reason == nil or reason == "" or reason == " ") then reason = "No reason" end outputChatBox("* "..getPlayerName(jfrom).." jailed "..getPlayerName(player).." for "..jtime.." seconds ("..reason..")", getRootElement(), 255, 0, 0) setElementPosition(player,1573.71, -1641.84, 73.46) local cxdata = exports.SAUGecho:getPlayerAccountData(player,"adminjailed") if cxdata == nil or cxdata == 0 or cxdata == false then cxdata = 0 end exports.SAUGecho:setPlayerAccountData(player,"adminjailed",cxdata+1) local cxdata = exports.SAUGecho:getPlayerAccountData(player,"adminjailed") if cxdata == 1 then exports.SAUGucp:givePlayerAch(player,9) end end triggerClientEvent(player, "showJailTime", player, jtime) return true end return false end addEvent("ArrestP", true) addEventHandler("ArrestP", getRootElement(), jailPlayer) it's has bug when player reconnect unjailed
  7. Tando

    [Mute Script]

    what about acses Denied?
  8. Tando

    [Mute Script]

    What about unmute?
  9. Tando

    [Mute Script]

    addCommandHandler("muteall", function(thePlayer, _, ...) if(isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Staff"))) then ----what i have to put outputChatBox ("Staff Team has been mute all") end end) how to make when i type this command all players get mute exept Who in Staff acl and unmute too
  10. Tando

    Skins Bug

    thanks it's has been fixed addCommandHandler("muteall", function(thePlayer, _, ...) if(isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Staff"))) then ----what i have to put outputChatBox ("Staff Team has been mute all") end end) sry for don't make much topics how to make when i type muteall all players get mute exept who in user.Staff and i need command able for who inside Staff Acl Group @Simple.
  11. Tando

    Skins Bug

    ERROR : attemmpt to compare nil with string Group players who have Group can take the skins from this shop only
  12. Tando

    Skins Bug

    local skins = { { 10, "TEST","TEST2"}, } local SkinLocs = { [1] = { outPos = { 1459.16, -1140.48, 24.06 }, inPos = { 161.1, -83.64, 1001.8 }, int = 18, dim = 18 }, } local markers = { } local sx, sy = guiGetScreenSize ( ) local org = { } function onClientMarkerSkinHit2 ( p ) if ( p ~= localPlayer or getElementDimension(localPlayer)~=getElementDimension(source) or getElementInterior(source)~=getElementInterior(localPlayer) ) then return end org.skin = getElementModel ( p ) window = guiCreateWindow(10, (sy/2-403/2), 222, 403, "Group Skin Shop", false) guiWindowSetSizable(window, false) tmp2 = guiCreateLabel(14, 34, 98, 30, "Choose skin", false, window) list = guiCreateGridList(13, 64, 197, 278, false, window) guiGridListAddColumn(list, "", 0.9) ---Removedtmp1 = guiCreateLabel(112, 34, 98, 30, "Skins Group \nAre $1,200", false, window) cancel = guiCreateButton(13, 352, 85, 32, "Cancel", false, window) buy = guiCreateButton(102, 352, 85, 32, "Buy Skin", false, window) showCursor ( true ) for i, v in pairs ( skins ) do local r = guiGridListAddRow ( list ) guiGridListSetItemText ( list, r, 1, tostring ( v [ 2 ] ).." (Clan: "..tostring ( v [ 3 ] )..")", false, false ) guiGridListSetItemData ( list, r, 1, tostring ( v [ 3 ] )) end addEventHandler ( "onClientGUIClick", root, onClientGUIClick_Skin2 ) end function onClientGUIClick_Skin2 ( ) if ( source == cancel ) then closeSkinShop2 ( true ) elseif ( source == buy ) then local r, c = guiGridListGetSelectedItem ( list ) if ( row == -1 ) then return exports.Messages:sendClientMessage("SAUG Shop : No skin selected",255,0,0) end local t = guiGridListGetItemText ( list, r, 1 ) local SGroup = guiGridListGetItemData(list, r, 1) outputDebugString(SGroup) for i, v in pairs ( skins ) do if ( tostring ( v [ 2 ].." (Clan: "..tostring ( v [ 3 ] )..")" ):lower ( ) == tostring ( t ):lower ( ) ) then sI = v [ 1 ] break end end if getElementData (localPlayer,"Job") == "Police" then return exports.Messages:sendClientMessage ( "SAUG Shop : You can't Equip any skin as Police, you must have job for this action.", 255, 0, 0 ) end if getElementData (localPlayer,"Clan") ~= SGroup then return exports.Messages:sendClientMessage ( "SAUG Shop : You are not part of this group", 255, 0, 0 ) end if getElementData(localPlayer,"Clan") == SGroup then triggerServerEvent ( "SAUGShops:Skin:UpdatePlayerDefaultSkin1", localPlayer, sI, SGroup ) end end end function closeSkinShop2 ( rSkin ) removeEventHandler ( "onClientGUIClick", root, onClientGUIClick_Skin2 ) destroyElement ( tmp2 ) -- destroyElement ( tmp1 ) destroyElement ( list ) destroyElement ( buy ) destroyElement ( cancel ) destroyElement ( window ) showCursor ( false ) end for i, s in pairs ( SkinLocs ) do local x, y, z = unpack ( s.inPos ) local sx, sy, sz = unpack ( s.outPos ) markers[i] = createMarker ( x, y, z - 1, "cylinder", 1.5, 50, 255, 50, 200 ) local blip = createBlip( sx, sy, sz, 45) setElementInterior ( markers[i], s.int ) setElementDimension ( markers[i], s.dim ) setBlipVisibleDistance(blip, 1000) local d = { int = s.int, dim = s.dim } setElementData ( markers[i], "SAUGShops:Skins->MarkerInfo1", d ) addEventHandler ( "onClientMarkerHit", markers[i], onClientMarkerSkinHit2 ) end --- server.lua addEvent ( "SAUGShops:Skin:UpdatePlayerDefaultSkin1", true ) addEventHandler ( "SAUGShops:Skin:UpdatePlayerDefaultSkin1", root, function ( s,Clan ) if (getElementData(client) >= tonumber(Clan)) and allowed[getElementData(client, "Clan")] then getElementData( client, (Clan) ) exports.SAUGucp:givePlayerAch(client,20) exports.SAUGMessages:sendClientMessage ( "You have purchased a new skin!", client, 0, 255, 0 ) setElementData ( client, "SAUGUser.UnemployedSkin", s ) local t = getPlayerTeam ( client ) setElementModel ( client, s ) else exports.SAUGMessages:sendClientMessage ( "You cannot Buy/Change your skin", client, 255, 0, 0 ) end end ) bug on if (getElementData(client) >= tonumber(Clan)) and allowed[getElementData(client, "Clan")] then getElementData( client, (Clan) ) i have changed it from price to clan !! { 10, "TEST","TEST2"}, 10= skin , TEST = Skin name , TEST2 = Clan name
  13. Tando

    [HD Problem]

    yea same 100/100 xd
  14. Tando

    [HD Problem]

    addEvent("onPlayerHeadshot") addEventHandler("onPlayerDamage", getRootElement(), function (attacker, weapon, bodypart, loss) if bodypart == 9 and weapon == 34 then local result = triggerEvent("onPlayerHeadshot", source, attacker, weapon, loss) if result == true then setElementHealth ( source, getElementHealth(source) - 100 ) if isPlayerDead ( source ) == true then killPed(source, attacker, weapon, bodypart) setPedHeadless( source, true ) setTimer( BackUp, 900, 1, source ) end end end end ) function BackUp( source ) if getElementType ( source ) == "player" then setPedHeadless ( source, false ) end end it's working fine but need to add img on it like when player kill someone headshot give img in killmessages
  15. Tando

    [Help Please]

    Thanks i have made it
  16. Tando

    [Help Please]

    ERROR: ettempt to call global 'getPlayerAccount' (a nil value) getAccountName(getPlayerAccount()) changed to getAccountName(getLocalPlayer()) ERORR : ettempt to call global 'getAccountName' (a nil value)
  17. Tando

    [Help Please]

    addEvent("vip",true) addEventHandler("vip",root,function(player) GUIEditor.label[5] = guiCreateLabel(14, 77, 298, 20, "Account Name:"..getAccountName(getPlayerAccount()), false, vipwindow) guiSetFont(GUIEditor.label[5], "clear-normal") GUIEditor.label[2] = guiCreateLabel(14, 97, 298, 20, "VIP: "..getElementData(getLocalPlayer(), "VIP"), false, vipwindow) guiSetFont(GUIEditor.label[2], "clear-normal") GUIEditor.label[3] = guiCreateLabel(14, 117, 298, 20, "VIP End: "..getElementData(getLocalPlayer(), "duration"), false, window) guiSetFont(GUIEditor.label[3], "clear-normal") This client Side but not Full Problem is Account Name and VIP End it's make Full GUI BUG VIP End = Duration on Database not GetElementData so how to fix it
  18. Tando

    Help Jobs bugged

    did u see ? @DNL291
  19. Tando

    Help Jobs bugged

    Function CIA ( player ) If getElementData(player, "Job") == "CIA" Then If getElementData(player,"Clan") == "None" then Cancelevent() exports.Messages:sendClientMessage("You must have clan to take CIA Job",player, 150,150,150) end end end local pclan = getElementData(player, "Clan") if(row["clantp"] ~= 0 and getElementData(player, "Clan") ~= "None" and getClanType(player) == row["clantp"]) then exports.Messages:sendClientMessage( "You can't take this job because your clan type does not allow that!",player, 255, 0, 0) return end This from our Job server side
  20. Tando

    Help Jobs bugged

    still player can take job Edit: Note that this will check if the player already has this Job, but I think you want to prevent the player from taking this job, in this case you'll need to show us the other part of the code. yea i want this player if haven't clan can't take job
  21. Tando

    Help Jobs bugged

    it's not working bcs all can take job i need it when player haven't clan and tried to take job he can't and give msg to him saying " you must be part in clan for take this job" Job only for clans so who haven't clan can't open gui or take it
  22. okay what about when player exit shop rob start?
  23. local x,y = guiGetScreenSize() local sx, sy = x/1280, y/768 addEvent("StartRobTimer",true) addEventHandler("StartRobTimer",root,function() addEventHandler( "onClientRender", root, showRobTime ) Time = 300 tick = getTickCount() end) function showRobTime( ) if getElementData( localPlayer, "ArrestedBy" ) or getElementData(localPlayer,"Jailed") == "yes" or isPedDead ( localPlayer ) then removeEventHandler("onClientRender",root,showRobTime) triggerServerEvent("giveRobMoney",localPlayer,1) return end if getTickCount( )-tick >= 1000 then Time = Time -1 tick = getTickCount() end dxDrawText(Time.." seconds left ", sx*69, sy*728, sx*187, sy*758, tocolor(254, 0, 0, 255), 1.80, "default-bold", "left", "bottom", false, false, false, false, false) if Time <= 0 then removeEventHandler("onClientRender",root,showRobTime) triggerServerEvent("giveRobMoney",localPlayer) end end server: function giveTheMoney(data) if(data == 1) then setElementData(source, "rob", false) exports.Messages:sendClientMessage("Store Robbery: The robbery ended because you were jailed/arrested!",source, 255, 100, 0) return end money = 3000 + math.random(100, 900) vip = getElementData(source, "viplevel") if vip == 2 then money = money+money*0.25 elseif vip == 3 then money = money+money*0.50 elseif vip == 4 then money = money+money*0.75 end givePlayerMoney(source, money) exports["Jobs"]:addJobMark(source, "Gangster", 1) setElementData(source, "rob", false) local textDisplay = textCreateDisplay() local textItem = textCreateTextItem("Robbery Successfull!\nYou received: "..convertNumber(money).."$", 0.5, 0.5, 2, 208, 29, 37, 200, 4, "center", "center" ) textDisplayAddText(textDisplay, textItem) textDisplayAddObserver(textDisplay, source) setTimer(textDestroyTextItem, 5000, 1, textItem) setTimer(textDestroyDisplay, 5000, 1, textDisplay) local xdata = exports.bcho:getPlayerAccountData(source,"robs") if xdata == nil or xdata == 0 or xdata == false then xdata = 0 end exports.bcho:setPlayerAccountData(source,"robs",xdata+1) local xdata = exports.bcho:getPlayerAccountData(source,"robs") if xdata == 1 then exports.ucp:givePlayerAch(source,2) elseif xdata == 50 then exports.ucp:givePlayerAch(source,3) elseif xdata == 1000 then exports.ucp:givePlayerAch(source,4) end end addEvent("giveRobMoney", true) addEventHandler("giveRobMoney", getRootElement(), giveTheMoney) function convertNumber ( number ) local formatted = number while true do formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2') if ( k==0 ) then break end end return formatted end addEventHandler("onPlayerTarget", getRootElement(), function(targetEl) if exports.bcho:isCriminal(source) then if(targetEl) then if(getElementType(targetEl) == "ped") then if(not getElementData(source, "rob")) then if(getElementData(targetEl, "robLoc") ~= false) then robloc = getElementData(targetEl, "robLoc") setElementData(source, "rob", robloc) setElementData(source, "Charges", tonumber(getElementData(source, "Charges"))+1000) triggerClientEvent(source, "StartRobTimer", getRootElement()) exports.Messages:sendClientMessage("Store Robbery: Don't get arrested/killed or you will fail the robbery",source, 255, 100, 0) end end end end end end) addEventHandler("onResourceStop", getResourceRootElement(getThisResource()), function() for k, v in ipairs(getElementsByType("player")) do setElementData(v, "rob", false) end end) thats without editing client side and serverside Timer if error it's like evade system losing stars after mins local wantedPoints = {} Timer( function () for _, plr in ipairs(Element.getAllByType("player")) do if (getWantedPoints(plr) and not getElementData(plr,"ArrestedBy")and not getElementData(plr,"Jailed") == true ) then if (getWantedPoints(plr) > 0) then setWantedPoints(plr, getWantedPoints(plr) - 1) end end end end, 60 * 1000, 0 ) function getWantedPoints(plr) if (plr and not plr.account.guest) then local a = plr.account.name if (not wantedPoints[a]) then wantedPoints[a] = getElementData(plr, "Wanted") or 0 end return wantedPoints[a] end end
×
×
  • Create New...