Raised This Month: $ Target: $400
 0% 

Check that player is on prop spawn


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
maciasbarlinek
Senior Member
Join Date: May 2015
Old 09-23-2016 , 17:50   Check that player is on prop spawn
Reply With Quote #1

Hello,

I need code to check that player is on prop spawn.
Do you know how to check it?

It should also include +/- 50 distance from prop spawn.

Regards,
maciasbarlinek
__________________
cam0 & lingzhidiyu - The best users
maciasbarlinek is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 09-23-2016 , 18:02   Re: Check that player is on prop spawn
Reply With Quote #2

what the hell is a prop spawn
Mitchell is offline
maciasbarlinek
Senior Member
Join Date: May 2015
Old 09-23-2016 , 18:04   Re: Check that player is on prop spawn
Reply With Quote #3

Defined space where players are teleported (spawned) after respawn.
__________________
cam0 & lingzhidiyu - The best users

Last edited by maciasbarlinek; 09-23-2016 at 18:07.
maciasbarlinek is offline
thecount
Veteran Member
Join Date: Jul 2013
Old 09-23-2016 , 21:48   Re: Check that player is on prop spawn
Reply With Quote #4

Is that like a custom entity or a plugin defined point?
thecount is offline
maciasbarlinek
Senior Member
Join Date: May 2015
Old 09-24-2016 , 06:22   Re: Check that player is on prop spawn
Reply With Quote #5

On round start everybody are on spawn.
How can i check for example after 10 seconds that player is still on spawn?
__________________
cam0 & lingzhidiyu - The best users
maciasbarlinek is offline
maciasbarlinek
Senior Member
Join Date: May 2015
Old 09-24-2016 , 08:03   Re: Check that player is on prop spawn
Reply With Quote #6

I made this code:

Code:
     LoopClients(i)
    {
        decl String:LastPlaceName[128];
        GetEntPropString(i, Prop_Send, "m_szLastPlaceName", LastPlaceName, sizeof(LastPlaceName));    
        if(StrEqual(LastPlaceName, "TSpawn", false))
        {
            if(GetClientTeam(i) == 2)
            {
                ForcePlayerSuicide(i);
            }
        }
    }
But it doesn't work for custom map where localisations aren't defined.
Do you know how to check it another way?
__________________
cam0 & lingzhidiyu - The best users
maciasbarlinek is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 09-24-2016 , 08:35   Re: Check that player is on prop spawn
Reply With Quote #7

store player's position at round start and then check it again after x amount of sec/min
if position is same force player suicide?
__________________
8guawong is offline
maciasbarlinek
Senior Member
Join Date: May 2015
Old 09-24-2016 , 09:02   Re: Check that player is on prop spawn
Reply With Quote #8

I have server JailBreak.
Here are prisoner cells, and i want to check that any player is here..

If i save player position he can deceive this plugin by changing his cell to another.
Do you have another idea?
__________________
cam0 & lingzhidiyu - The best users

Last edited by maciasbarlinek; 09-24-2016 at 09:03.
maciasbarlinek is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 09-24-2016 , 09:20   Re: Check that player is on prop spawn
Reply With Quote #9

so use any zone plugins that can be found on sm and setup a big rectangle that encompasses all cellblocks
but this way you would have to do it for all the maps :s
__________________

Last edited by 8guawong; 09-24-2016 at 09:21.
8guawong is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 09-24-2016 , 12:57   Re: Check that player is on prop spawn
Reply With Quote #10

Quote:
Originally Posted by maciasbarlinek View Post
I have server JailBreak.
Here are prisoner cells, and i want to check that any player is here..

If i save player position he can deceive this plugin by changing his cell to another.
Do you have another idea?
some details you should have mentioned within your first post.
Mitchell 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 00:36.


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