Jump to content

xJ4ckk

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by xJ4ckk

  1. Reinstall your MTA
  2. xJ4ckk

    Ghost Mode

    Please guys
  3. xJ4ckk

    Ghost Mode

    Please guys can you write it in my script in code??
  4. xJ4ckk

    Ghost Mode

    function GhostMode(player) local account = getPlayerAccount(player) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) if isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Moderator" ) ) or isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Admin" ) ) then if getElementAlpha(player) == 255 then setElementAlpha(player,0) setPlayerNametagShowing(player,false) setPedWeaponSlot(player,0) outputChatBox("#ffffff[GHOSTMODE] #379bffYou have enabled the Ghost Mode.",player,255,255,255,true) else setElementAlpha(player,255) setPlayerNametagShowing(player,true) outputChatBox("#ffffff[GHOSTMODE] #379bffYou have disabled the Ghost Mode.",player,255,255,255,true) end end end addCommandHandler("ghostmode",GhostMode) Can please someone help me to hide the blip when a player enable the Ghost Mode, and show the blip again when the player disable the Ghost Mode. Please guys need your help!
  5. xJ4ckk

    no deathmatch

    Please guys i need a function to the destroy my weapon when I set a weapon
  6. xJ4ckk

    no deathmatch

    ------ client ------ addEventHandler ( "onClientPlayerDamage",root, function () if getElementData(source,"invincible") then cancelEvent() end end) addEventHandler("onClientPlayerStealthKill",localPlayer, function (targetPlayer) if getElementData(targetPlayer,"invincible") then cancelEvent() end end) ------ server ------ function noDeathmatch(thePlayer) if getElementData(thePlayer,"invincible") then setElementData(thePlayer,"invincible",false) setPlayerHudComponentVisible(thePlayer,"weapon",true) setPlayerHudComponentVisible(thePlayer,"ammo",true) toggleControl(thePlayer,"next_weapon",true) toggleControl(thePlayer,"previous_weapon",true) toggleControl(thePlayer,"fire",true) toggleControl(thePlayer,"aim_weapon",true) toggleControl(thePlayer,"vehicle_fire",true) toggleControl(thePlayer,"vehicle_secondary_fire",true) outputChatBox("#ffffff[DEATHMATCH] #ff6464You have disabled the no deathmatch mode.",thePlayer,255,255,255,true) else setElementData(thePlayer,"invincible",true) setElementHealth(thePlayer,1000) setPedArmor(thePlayer,100) setPedWeaponSlot(thePlayer,0) setPlayerHudComponentVisible(thePlayer,"weapon",false) setPlayerHudComponentVisible(thePlayer,"ammo",false) toggleControl(thePlayer,"next_weapon",false) toggleControl(thePlayer,"previous_weapon",false) toggleControl(thePlayer,"fire",false) toggleControl(thePlayer,"aim_weapon",false) toggleControl(thePlayer,"vehicle_fire",false) toggleControl(thePlayer,"vehicle_secondary_fire",false) outputChatBox("#ffffff[DEATHMATCH] #ff6464You have enabled the no deathmatch mode.",thePlayer,255,255,255,true) end end addCommandHandler("nodm",noDeathmatch) i am working on a no deathmatch script but can anyone help me with this please ----> If a player set a weapon on the F1 panel that he does not get the weapon
  7. xJ4ckk

    Setable hours

    I mean the Playtime on the Scoreboard bra addEventHandler ( "onResourceStart" , resourceRoot , function ( ) for index , player in ipairs ( getElementsByType ("player" ) ) do local pAccount = getPlayerAccount ( player ) if not isGuestAccount ( pAccount ) then local minutes = getAccountData ( pAccount , "Online.minutes" ) if minutes then local hours = getAccountData ( pAccount , "Online.hours" ) if # tostring ( minutes ) == 1 then minutes = "0" .. minutes end if # tostring ( hours ) == 1 then hours = "0" .. hours end setElementData ( player , "Playtime" , hours .. ":" .. minutes .. "" ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , player ) setElementData ( player , "Online.timer" , timer ) else setAccountData ( pAccount , "Online.minutes" , 0 ) setAccountData ( pAccount , "Online.hours" , 0 ) setElementData ( player , "Playtime" , "00:00 " ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , player ) setElementData ( player , "Online.timer" , timer ) end else setElementData ( player , "Playtime" , "" ) end end end ) addEventHandler ( "onResourceStop" , resourceRoot , function ( ) for index , player in ipairs ( getElementsByType ( "player" ) ) do local pAccount = getPlayerAccount ( player ) if not isGuestAccount ( pAccount ) then local timer = getElementData ( player , "Online.timer" ) if isTimer ( timer ) then killTimer ( timer ) end end end end ) addEventHandler ( "onPlayerLogin" , root , function ( _ , pAccount ) local minutes = getAccountData ( pAccount , "Online.minutes" ) if minutes then local hours = getAccountData ( pAccount , "Online.hours" ) if # tostring ( minutes ) == 1 then minutes = "0" .. minutes end if # tostring ( hours ) == 1 then hours = "0" .. hours end setElementData ( source , "Playtime" , hours .. ":" .. minutes .. "" ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , source ) setElementData ( source , "Online.timer" , timer ) else setAccountData ( pAccount , "Online.minutes" , 0 ) setAccountData ( pAccount , "Online.hours" , 0 ) setElementData ( source , "Playtime" , "00:00" ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , source ) setElementData ( source , "Online.timer" , timer ) end end ) addEventHandler ( "onPlayerJoin" , root , function ( ) setElementData ( source , "Playtime" , "" ) end ) addEventHandler ( "onPlayerQuit" , root , function ( ) local pAccount = getPlayerAccount ( source ) if not isGuestAccount ( pAccount ) then local timer = getElementData ( source , "Online.timer" ) if isTimer ( timer ) then killTimer ( timer ) end end end ) function actualizarJugadorOn ( player ) local pAccount = getPlayerAccount ( player ) local minutes = getAccountData ( pAccount , "Online.minutes" ) local hours = getAccountData ( pAccount , "Online.hours" ) minutes = tostring ( tonumber ( minutes ) + 1 ) if minutes == "60" then hours = tostring ( tonumber ( hours ) + 1 ) minutes = "00" end setAccountData ( pAccount , "Online.minutes" , tonumber ( minutes ) ) setAccountData ( pAccount , "Online.hours" , tonumber ( hours ) ) if # tostring ( minutes ) == 1 then minutes = "0" .. minutes end if # tostring ( hours ) == 1 then hours = "0" .. hours end setElementData ( player , "Playtime" , hours .. ":" .. minutes .. "" ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , player ) setElementData ( player , "Online.timer" , timer ) end
  8. xJ4ckk

    Setable hours

    Please guys i need your help, i need a function to set players time (Only hours not minutes) ------------------------------------------------------------------------------------------------------------------- addEventHandler ( "onResourceStart" , resourceRoot , function ( ) for index , player in ipairs ( getElementsByType ( "player" ) ) do local pAccount = getPlayerAccount ( player ) if not isGuestAccount ( pAccount ) then local minutes = getAccountData ( pAccount , "Online.minutes" ) if minutes then local hours = getAccountData ( pAccount , "Online.hours" ) if # tostring ( minutes ) == 1 then minutes = "0" .. minutes end if # tostring ( hours ) == 1 then hours = "0" .. hours end setElementData ( player , "Playtime" , hours .. ":" .. minutes .. "" ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , player ) setElementData ( player , "Online.timer" , timer ) else setAccountData ( pAccount , "Online.minutes" , 0 ) setAccountData ( pAccount , "Online.hours" , 0 ) setElementData ( player , "Playtime" , "00:00 " ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , player ) setElementData ( player , "Online.timer" , timer ) end else setElementData ( player , "Playtime" , "" ) end end end ) addEventHandler ( "onResourceStop" , resourceRoot , function ( ) for index , player in ipairs ( getElementsByType ( "player" ) ) do local pAccount = getPlayerAccount ( player ) if not isGuestAccount ( pAccount ) then local timer = getElementData ( player , "Online.timer" ) if isTimer ( timer ) then killTimer ( timer ) end end end end ) addEventHandler ( "onPlayerLogin" , root , function ( _ , pAccount ) local minutes = getAccountData ( pAccount , "Online.minutes" ) if minutes then local hours = getAccountData ( pAccount , "Online.hours" ) if # tostring ( minutes ) == 1 then minutes = "0" .. minutes end if # tostring ( hours ) == 1 then hours = "0" .. hours end setElementData ( source , "Playtime" , hours .. ":" .. minutes .. "" ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , source ) setElementData ( source , "Online.timer" , timer ) else setAccountData ( pAccount , "Online.minutes" , 0 ) setAccountData ( pAccount , "Online.hours" , 0 ) setElementData ( source , "Playtime" , "00:00" ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , source ) setElementData ( source , "Online.timer" , timer ) end end ) addEventHandler ( "onPlayerJoin" , root , function ( ) setElementData ( source , "Playtime" , "" ) end ) addEventHandler ( "onPlayerQuit" , root , function ( ) local pAccount = getPlayerAccount ( source ) if not isGuestAccount ( pAccount ) then local timer = getElementData ( source , "Online.timer" ) if isTimer ( timer ) then killTimer ( timer ) end end end ) function actualizarJugadorOn ( player ) local pAccount = getPlayerAccount ( player ) local minutes = getAccountData ( pAccount , "Online.minutes" ) local hours = getAccountData ( pAccount , "Online.hours" ) minutes = tostring ( tonumber ( minutes ) + 1 ) if minutes == "60" then hours = tostring ( tonumber ( hours ) + 1 ) minutes = "00" end setAccountData ( pAccount , "Online.minutes" , tonumber ( minutes ) ) setAccountData ( pAccount , "Online.hours" , tonumber ( hours ) ) if # tostring ( minutes ) == 1 then minutes = "0" .. minutes end if # tostring ( hours ) == 1 then hours = "0" .. hours end setElementData ( player , "Playtime" , hours .. ":" .. minutes .. "" ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , player ) setElementData ( player , "Online.timer" , timer ) end
  9. Yes I have it already but my problem is how i can allow it for Smods and Mods too? READ THE RED TEXT, I ALREADY ALLOWED IT FOR ADMINS BUT I WANT TO ALLOW IT FOR SMODS AND MODS TOO, BUT HOW? function toggleGodMode(thePlayer) local account = getPlayerAccount(thePlayer) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Admin" ) ) ) then if getElementData(thePlayer,"invincible") then setElementData(thePlayer,"invincible",false) outputChatBox("#66CC66[GODMODE] #FFFFFFYou have disabled the God Mode.",thePlayer,255,255,255, true) else setElementData(thePlayer,"invincible",true) outputChatBox("#66CC66[GODMODE] #FFFFFFYou have enabled the God Mode.",thePlayer,255,255,255, true) end end end addCommandHandler("godmode",toggleGodMode)
  10. CAN ANYONE TELL ME HOW I CAN ALLOW GODMODE FOR ADMINS, SMODS AND MODS? function toggleGodMode(thePlayer) local account = getPlayerAccount(thePlayer) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Admin" ) ) ) then if getElementData(thePlayer,"invincible") then setElementData(thePlayer,"invincible",false) outputChatBox("#66CC66[GODMODE] #FFFFFFYou have disabled the God Mode.",thePlayer,255,255,255, true) else setElementData(thePlayer,"invincible",true) outputChatBox("#66CC66[GODMODE] #FFFFFFYou have enabled the God Mode.",thePlayer,255,255,255, true) end end end addCommandHandler("godmode",toggleGodMode)
  11. Dutchman i tried your Antivehicle script, it is very good but when i create a vehicle and press fast "F" i can drive in the vehicle?
  12. Thank you guys!
  13. I have removed the MoneyZone line and wanted to replace it with something else, if I had not removed the MoneyZone I would have to insert the cooardinates where the players can not spawn any vehicles. So I need your help to make it without coordinates I want to do it when I enter the Greenzone I can not create a vehicle. I mean without that: setElementPosition (hitElement, 2018.33, 1534.77, 12.37)
  14. I have a Greenzone script on my MTA Server and please can anyone tell me how i can Dissalow Vehicles in the Greenzone?? when i walk into the Greenzone i can't shoot etc.. but i can create Vehicles i want to disallow vehicles in the Greenzone :(( please help I use this: https://community.multitheftauto.com/index.php?p=resources&s=details&id=761
×
×
  • Create New...