xJ4ckk Posted February 2, 2017 Share Posted February 2, 2017 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! Link to comment
!#NssoR_) Posted February 2, 2017 Share Posted February 2, 2017 To get the blip, using this function. getAttachedElements Link to comment
xJ4ckk Posted February 2, 2017 Author Share Posted February 2, 2017 (edited) Please guys can you write it in my script in code?? Edited February 2, 2017 by xJ4ckk Link to comment
Storm-Hanma Posted January 15, 2018 Share Posted January 15, 2018 still alive lol ?need help? 1 Link to comment
ÆBKV Posted January 15, 2018 Share Posted January 15, 2018 (edited) Yes I am still alive Edited January 15, 2018 by ÆBKV 1 Link to comment
Storm-Hanma Posted January 16, 2018 Share Posted January 16, 2018 Lol you don't need help 1 Link to comment
alonemta Posted January 16, 2018 Share Posted January 16, 2018 Destroy element( player blips) is not working I tested pls help how to fix this ? @khadeer143 @AEB help how to fix this Link to comment
KaMi Posted January 16, 2018 Share Posted January 16, 2018 (edited) 4 minutes ago, alonemta said: Destroy element( player blips) is not working I tested pls help how to fix this ? @khadeer143 @AEB help how to fix this post your final code. Maybe it´s not working because you created a new function to the blip Edited January 16, 2018 by <~KaMiKaZe~> Link to comment
alonemta Posted January 16, 2018 Share Posted January 16, 2018 I really don't know how to sorry for this I just missed out my code I lied about code will be help full if you do that for this plss I am newbie sorry I lied Link to comment
Storm-Hanma Posted January 16, 2018 Share Posted January 16, 2018 Well don't lie again try this destroyElement( blip[player] ) 1 Link to comment
KaMi Posted January 16, 2018 Share Posted January 16, 2018 (edited) 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("g",GhostMode) function (player) for index, element in ipairs ( getAttachedElements ( player ) ) do if ( getElementType (element) == "blip" ) then destroyElement (element) end end end addCommandHandler("ghostmode",GhostMode) Oops, i forget the name of function Edited January 16, 2018 by <~KaMiKaZe~> 1 Link to comment
Storm-Hanma Posted January 16, 2018 Share Posted January 16, 2018 (edited) Thanks kamikaze ,next I too forget about giving functions I will also use this script ,thanks for fixing Edited January 16, 2018 by Khadeer143 Link to comment
alonemta Posted January 16, 2018 Share Posted January 16, 2018 How to add ? Server side or client side ? Link to comment
KaMi Posted January 16, 2018 Share Posted January 16, 2018 Just now, alonemta said: How to add ? Server side or client side ? serverside Link to comment
Storm-Hanma Posted January 16, 2018 Share Posted January 16, 2018 Server side alone MTA lolll Link to comment
KaMi Posted January 16, 2018 Share Posted January 16, 2018 if you can´t see anyone, just use setElementVisibleTo Link to comment
ÆBKV Posted January 17, 2018 Share Posted January 17, 2018 (edited) -- SERVER -- local ghostmode = false addCommandHandler("ghostmode", function(player) if hasObjectPermissionTo(player,"general.adminpanel") == false then outputChatBox("You don't have permission to use this command.",player,255,0,0) return end for index,players in ipairs(getElementsByType("player")) do if ghostmode == false then ghostmode = true setElementVisibleTo(player,players,false) setElementAlpha(player,230) setPlayerNametagShowing(player,false) outputChatBox("Ghost Mode: #00FF00enabled",player,255,255,255,true) else ghostmode = false setElementVisibleTo(player,players,true) setElementAlpha(player,255) setPlayerNametagShowing(player,true) outputChatBox("Ghost Mode: #FF0000disabled",player,255,255,255,true) end end end ) Edited January 17, 2018 by ÆBKV 1 Link to comment
alonemta Posted January 21, 2018 Share Posted January 21, 2018 Thanks all I need one more help i want a script which is count players travel time from marker to marker. start time and end time. the time is stored somewhere and the best time (the shortest) is callable 1 Link to comment
kieran Posted January 22, 2018 Share Posted January 22, 2018 (edited) On 1/21/2018 at 19:10, alonemta said: Thanks all I need one more help i want a script which is count players travel time from marker to marker. start time and end time. the time is stored somewhere and the best time (the shortest) is callable I ask for a lot of help on this forum, but that's because I make the scripts and find a load of bugs/errors, unfortunately, I am an idiot, so I post code I HAVE MADE, so that I can get help on how to fix certain problems I have struggled with for about a week or so. Go to YouTube and look up scripting tutorials. And please, make a new topic..... Press that "Start new topic" text and not the reply button, this isn't even your topic and you're asking for help on it... Go download scripts from community, mess around with them, start small and build up your skills, then when you actually know a little about coding, come back and ask for help THIS FORUM IS TO HELP PEOPLE WITH SCRIPTS, WE ARE NOT A CHARITY Edited January 22, 2018 by kieran 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now