Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: Eva on May 27, 2016, 01:39 PM

Title: Ghost mode
Post by: Eva on May 27, 2016, 01:39 PM
Hello i have a question, i made this Ghostmode for admin to be invisible, how can i also remove (playername) tag?
this is my code if ( cmd == "ghost" )
{
          if ( !player.IsSpawned ) PrivMessage( "You haven't spawned yet..", player );
          if ( stats[ player.ID ].Level < 4 ) PrivMessage( "You are not a Admin.", player );
            else
               {
                  ClientMessageToAll( "" + player + " went into Invisible mode.", 255, 0, 0 );
                  player.SetAlpha( 0, 0 ); // Makes the player model transparent, The alpha value from 0 to 255,The time in milliseconds the
fading progress should take
                  player.RemoveMarker();
       }
}
Title: Re: Ghost mode
Post by: KAKAN on May 27, 2016, 01:43 PM
For now, you can't remove a player's nametag but if you do it, then it will remove the nametags of all players present in the server.
Title: Re: Ghost mode
Post by: Eva on May 27, 2016, 01:47 PM
ok shit... thnx Kakan
Title: Re: Ghost mode
Post by: Mötley on May 28, 2016, 01:56 PM
@KAKAN is that suppose to be a bug? If not I have a general Idea how to do so.
Title: Re: Ghost mode
Post by: Coolkid on May 28, 2016, 02:58 PM
Quote from: Mötley on May 28, 2016, 01:56 PM@KAKAN is that suppose to be a bug? If not I have a general Idea how to do so.
its not bug i think in 0.3 we could hide name tag of players but in 0.4 we cant we can hide nametag for all players and what idea do u have
Title: Re: Ghost mode
Post by: Eva on May 28, 2016, 03:21 PM
Well it would have been nice for admins to go in game completly invisible, as now you see the nametag fly lol. and there is a shadow xD
Title: Re: Ghost mode
Post by: Mötley on May 28, 2016, 03:46 PM
I am in the middle of moving so I cant really show any crazy scripting..... but without scripting it I copied something from a script of mine to share the concept in a similar type of way

  for (local i=0;i<GetMaxPlayers();i++) {
    local player = FindPlayer(i);
   
    if (player) {
Title: Re: Ghost mode
Post by: KAKAN on May 28, 2016, 05:08 PM
how much you try, you can't hide the nametag of a specific player :P
Title: Re: Ghost mode
Post by: Cool on May 28, 2016, 07:44 PM
yes it would be nice if its possible
Title: Re: Ghost mode
Post by: Mötley on May 28, 2016, 08:49 PM
I think it is possible. I will attempt to make a snippet. As well weapon pickups removing are not broken as well there are proper tricks.
Title: Re: Ghost mode
Post by: Cool on May 28, 2016, 09:05 PM
Quote from: Mötley on May 28, 2016, 08:49 PMI think it is possible. I will attempt to make a snippet. As well weapon pickups removing are not broken as well there are proper tricks.
Really then please release.
Title: Re: Ghost mode
Post by: EK.IceFlake on May 29, 2016, 05:20 AM
Quote from: Mötley on May 28, 2016, 08:49 PMI think it is possible. I will attempt to make a snippet. As well weapon pickups removing are not broken as well there are proper tricks.
I think that should be @YSC job
Title: Re: Ghost mode
Post by: Cool on May 29, 2016, 03:37 PM
its  very nice function if @ysc3839 do it its would be nice
Title: Re: Ghost mode
Post by: Thijn on May 29, 2016, 03:52 PM
Quote from: Mötley on May 28, 2016, 08:49 PMI think it is possible. I will attempt to make a snippet. As well weapon pickups removing are not broken as well there are proper tricks.
Why would you think so? There's no support for it in the squirrel plugin and there's no API call you can use to remove a player's specific nametag. Looks pretty impossible to me :P
Title: Re: Ghost mode
Post by: Eva on May 29, 2016, 04:47 PM
Hope your wrong @Thijn :), and Mötley this could be a breaktrue :D *****

Quote#maakhetonmogelijkemogelijk
Title: Re: Ghost mode
Post by: KAKAN on May 29, 2016, 05:10 PM
Quote from: Eva on May 29, 2016, 04:47 PMHope your wrong @Thijn :), and Mötley this could be a breaktrue :D *****

Quote#maakhetonmogelijkemogelijk
There's no hope. You can hope for the nametags system for each player.
Title: Re: Ghost mode
Post by: ysc3839 on May 30, 2016, 10:01 AM
Quote from: Hercules on May 29, 2016, 03:37 PMits  very nice function if @ysc3839 do it its would be nice
What?
Title: Re: Ghost mode
Post by: EK.IceFlake on May 30, 2016, 01:33 PM
You can @KAKAN.
There is good hope :)
I'll tell you
Did you saw, when players look through a glass they cant see nametags?
If you make a noncollision object around the player so its blocking the view of that player and his nametags, then set its alpha to 0, you achieved it!
[spoiler]that's the same principle on which we hackers discover flaws[/spoiler]
Title: Re: Ghost mode
Post by: Cool on May 30, 2016, 02:10 PM
Quote from: ysc3839 on May 30, 2016, 10:01 AM
Quote from: Hercules on May 29, 2016, 03:37 PMits  very nice function if @ysc3839 do it its would be nice
What?
that the function of ghost mode :P
Title: Re: Ghost mode
Post by: ysc3839 on May 30, 2016, 02:25 PM
Quote from: Hercules on May 30, 2016, 02:10 PM
Quote from: ysc3839 on May 30, 2016, 10:01 AM
Quote from: Hercules on May 29, 2016, 03:37 PMits  very nice function if @ysc3839 do it its would be nice
What?
that the function of ghost mode :P
I don't think I can do that.
Title: Re: Ghost mode
Post by: KAKAN on May 30, 2016, 03:34 PM
Quote from: ysc3839 on May 30, 2016, 02:25 PM
Quote from: Hercules on May 30, 2016, 02:10 PM
Quote from: ysc3839 on May 30, 2016, 10:01 AM
Quote from: Hercules on May 29, 2016, 03:37 PMits  very nice function if @ysc3839 do it its would be nice
What?
that the function of ghost mode :P
I don't think I can do that.

Quote from: ext-d.CrystalBlue on May 30, 2016, 01:33 PMYou can @KAKAN.
There is good hope :)
I'll tell you
Did you saw, when players look through a glass they cant see nametags?
If you make a noncollision object around the player so its blocking the view of that player and his nametags, then set its alpha to 0, you achieved it!
[spoiler]that's the same principle on which we hackers discover flaws[/spoiler]
Maybe we can try doing this?
Title: Re: Ghost mode
Post by: Cool on May 30, 2016, 03:41 PM
Quote from: KAKAN on May 30, 2016, 03:34 PM
Quote from: ysc3839 on May 30, 2016, 02:25 PM
Quote from: Hercules on May 30, 2016, 02:10 PM
Quote from: ysc3839 on May 30, 2016, 10:01 AM
Quote from: Hercules on May 29, 2016, 03:37 PMits  very nice function if @ysc3839 do it its would be nice
What?
that the function of ghost mode :P
I don't think I can do that.

Quote from: ext-d.CrystalBlue on May 30, 2016, 01:33 PMYou can @KAKAN.
There is good hope :)
I'll tell you
Did you saw, when players look through a glass they cant see nametags?
If you make a noncollision object around the player so its blocking the view of that player and his nametags, then set its alpha to 0, you achieved it!
[spoiler]that's the same principle on which we hackers discover flaws[/spoiler]
Maybe we can try doing this?
Good Luck
Title: Re: Ghost mode
Post by: Coolkid on May 30, 2016, 04:51 PM
Quote from: Hercules on May 30, 2016, 03:41 PM
Quote from: KAKAN on May 30, 2016, 03:34 PM
Quote from: ysc3839 on May 30, 2016, 02:25 PM
Quote from: Hercules on May 30, 2016, 02:10 PM
Quote from: ysc3839 on May 30, 2016, 10:01 AM
Quote from: Hercules on May 29, 2016, 03:37 PMits  very nice function if @ysc3839 do it its would be nice
What?
that the function of ghost mode :P
I don't think I can do that.

Quote from: ext-d.CrystalBlue on May 30, 2016, 01:33 PMYou can @KAKAN.
There is good hope :)
I'll tell you
Did you saw, when players look through a glass they cant see nametags?
If you make a noncollision object around the player so its blocking the view of that player and his nametags, then set its alpha to 0, you achieved it!
[spoiler]that's the same principle on which we hackers discover flaws[/spoiler]
Maybe we can try doing this?
Good Luck
Kakan said we can try not i can try it means you can also help him not just show errors and get your script fixed
Title: Re: Ghost mode
Post by: Cool on May 30, 2016, 06:23 PM
@coolkid your talks makes me laugh I think you are really a kid of 10 11 years I guess it from your talks and kakan doesent need help of who less know from he's talking about pro not noobs like you
Title: Re: Ghost mode
Post by: KAKAN on May 30, 2016, 06:36 PM
Quote from: Hercules on May 30, 2016, 06:23 PM@coolkid your talks makes me laugh I think you are really a kid of 10 11 years I guess it from your talks and kakan doesent need help of who less know from he's talking about pro not noobs like you
off: Who said I don't need help? I'm a noob in making models, so if someone can make a model for that, then I may attach the object to that player. But actually, ysc siad that he can't do it. So, I quoted Crystal's idea and said him that we can actually do that. So, that's not any way related to actually doing that :P
Title: Re: Ghost mode
Post by: Mötley on May 30, 2016, 07:03 PM
*As some other viewers seen I am not available much lately due to issues not regarding VCMP

Well as @Thijn said "There is not enough documentation in the squirrel plugin"
You are correct Thijn. There is not even "ONE" function to modify to eventually get a hold of a specific players name-tag in any type of way,. Therefore this needs to be added in a update hopefully in the same aspect as LU as this is vital for VIP accounts etc..

Also As I said Pickups are not broken there are correct ways to remove Pickups and place them back. The current issue where as I stopped was due to I did not take the time to configure a way to find the max pickups that already exist. as I could re replace weapons with any given amount of time but it appears that the pickups grew in brightness, So I did not want to go any further and stopped the script (laziness)

This was related to

onScriptLoad()
CreatePickup(model, Vector(x, y, z));
With a custom function to add a respawn time as pickups need to be removed from the xml and scripted since broken.

I do not have the script any more but hear is how it somewhat looked

function PlacePickup(model, x, y, z, respawn=300) {
  local iWeapon = CreatePickup(model, Vector(x, y, z));
  iWeapon.RespawnTime = respawn;
 
  return iWeapon;
}

On player pickup remove that pickup with what i think i used was Pickup.Remove(); I could be wrong.

This is fixable. I currently did not like the fact of how much scripting I would have to do as it appeared I would need to go about 500+ lines so... I automatically trashed that, Figured I would re script in the future. This is very possible without timers. I just do not have the time at this time. I will take the time to correctly place these pickups after being removed in an correct fashion .