Raised This Month: $51 Target: $400
 12% 

[CSS][Surf] Redie


Post New Thread Reply   
 
Thread Tools Display Modes
PersianMG
Member
Join Date: Dec 2014
Old 01-11-2015 , 06:25   Re: [CSS][Surf] Redie
Reply With Quote #181

Here's a nice snippet for people wishing to do a proper alive check for things like beacon/other commands. Personally I had the issue where a betting plugin was counting 'redie ghosts' in its odds calculation.

So to fix, add this to end of reddie.sp:
Code:
//Public function to check if client is a redie ghost
public bool:redieIsGhost(client) {
  return g_bIsGhost[client];
}
Then to plugin of your choice, add:

HTML Code:
new Handle:g_RedieState;
And in public OnPluginStart()
Code:
g_RedieState = CreateGlobalForward("redieIsGhost", ET_Single, Param_Cell);
Now to do a check if player is alive and not a redie ghost, simply do:
Code:
  decl bool:isGhost;

  Call_StartForward(g_RedieState);
  Call_PushCell(client);
  Call_Finish(_:isGhost);

  //Ensure player is alive and is not a redie ghost
  if (IsPlayerAlive(client) && !isGhost)
    //Do stuff here
Also, using @alive tag seems to not target redie ghosts.
!beacon @alive works as intended.

Last edited by PersianMG; 01-11-2015 at 06:25.
PersianMG is offline
Chanz
Veteran Member
Join Date: Aug 2008
Location: Germany - Stuttgart
Old 05-01-2015 , 10:17   Re: [CSS][Surf] Redie
Reply With Quote #182

@PersianMG: Thanks for the snippet. The current version of my redie uses a command hook to detect if an admin uses @alive. If that is the case the entity property m_lifeState is being set to 'death' for all ghosts for like 0.2 seconds.
I'm not sure if that always works and probably adding the global forward is way better. I'd be thankful if someone could add natives ( https://wiki.alliedmods.net/Creating...d_Scripting%29 ) to the current redie by forking my project on github.com.
__________________
[ SourceModPlugins.org ][ My Plugins ]

Thank you for donations: [ Paypal ]

Video Tutorial (German): [ Gameserver & SourceMod Plugins mit HLSW verwalten ]
Chanz is offline
MrBrightSide
Member
Join Date: Jun 2011
Old 05-06-2015 , 11:15   Re: [CSS][Surf] Redie
Reply With Quote #183

Hello, is it possible to add a feature so players in spec could also use the command to surf without the fear of other players killing them. This would be great for my community Surf Deathmatch server so even new surfers could learn the skill/map before going up against other players.
MrBrightSide is offline
Chanz
Veteran Member
Join Date: Aug 2008
Location: Germany - Stuttgart
Old 05-08-2015 , 16:48   Re: [CSS][Surf] Redie
Reply With Quote #184

Hi, I'm sorry but currently the only way is to join a team, die and then type !redie into the chat. I'm not sure how the css engine reacts to spectators that are alive, this can cause some problems.
__________________
[ SourceModPlugins.org ][ My Plugins ]

Thank you for donations: [ Paypal ]

Video Tutorial (German): [ Gameserver & SourceMod Plugins mit HLSW verwalten ]
Chanz is offline
MrBrightSide
Member
Join Date: Jun 2011
Old 05-12-2015 , 15:41   Re: [CSS][Surf] Redie
Reply With Quote #185

I can't remember how long ago this was but this plugin https://forums.alliedmods.net/showthread.php?t=99300 added a respawn command and when used on a spectator they would join the game as a neutral team. So if nothing change with updates then the css engine can handle players in spec fine.
MrBrightSide is offline
flugi
New Member
Join Date: Jun 2014
Old 05-26-2015 , 18:56   Re: [CSS][Surf] Redie
Reply With Quote #186

Hello
is it possible to add a feature to block the spray's for ghosts?
its a bit annoying if a ghost uses his spray and the normal player get confused from the spray or the sound
flugi is offline
Inferno123
New Member
Join Date: Jun 2015
Old 06-19-2015 , 08:31   Re: [CSS][Surf] Redie
Reply With Quote #187

The ghost does not get boosted on maps with boosts on jumps, neither does it get teleported to "jail" for example. I the map surf_ski_2 It would be nice if this could be fixed
Inferno123 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:45.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode