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

Anti-Stuck


Post New Thread Reply   
 
Thread Tools Display Modes
Chaos Llama
Senior Member
Join Date: Jul 2006
Old 09-01-2007 , 19:33   Re: CSS Anti-Stuck
Reply With Quote #11

Quote:
Originally Posted by devicenull View Post
Hint: It's the same code.
Weird, it didnt work in my zm server.
Chaos Llama is offline
k4rnage
Member
Join Date: Aug 2007
Old 09-06-2007 , 06:47   Re: CSS Anti-Stuck
Reply With Quote #12

It works

How i can restrict it only for zombie please ? or add 2 or 3 seconds before the teleport ?
k4rnage is offline
Molli
SourceMod Donor
Join Date: Aug 2007
Location: Finland
Old 09-25-2007 , 22:41   Re: CSS Anti-Stuck
Reply With Quote #13

well...its works.But teleports players to enemy base
Molli is offline
Gently
Member
Join Date: Mar 2008
Old 05-03-2008 , 23:00   Re: CSS Anti-Stuck
Reply With Quote #14

i agree with molly. this plugin would be great if it only transported the player
to their spawn only....i had to remove it for exploits....
__________________
Gently is offline
Molli
SourceMod Donor
Join Date: Aug 2007
Location: Finland
Old 05-12-2008 , 22:50   Re: CSS Anti-Stuck
Reply With Quote #15

Can uploader fix this plugin?And maybe put timelimit so after xx seconds round start it no longer work?

I got 34 slot server and still people get stuck 40 players maps
Molli is offline
FunTF2Server
Veteran Member
Join Date: Apr 2008
Old 08-04-2008 , 20:26   Re: CSS Anti-Stuck
Reply With Quote #16

Can anyone please edit this plugin for it waits 15 seconds before teleporting the player? That way people can't abuse it. I imagine this would only require adding a simple delay into the code somewhere, but I'm not sure how.

Optional, but would be nice, is also add code for a player can only use the command once every 5 minutes, to further prevent abuse.
__________________
FunTF2Server is offline
FunTF2Server
Veteran Member
Join Date: Apr 2008
Old 08-15-2008 , 23:50   Re: CSS Anti-Stuck
Reply With Quote #17

necrobump
__________________
FunTF2Server is offline
YellowCakeKlan
Junior Member
Join Date: Aug 2008
Old 08-23-2008 , 17:07   Re: CSS Anti-Stuck
Reply With Quote #18

i too would like to see this plugin working again.

i run a server with new maps updated daily. and these new maps sometimes have spawns that are bugged and people get stuck in the ground. it would be awesome if someone could get this anti-stuck plugin working again.

it doesn't seem like it's hard to fix it, seems it's simple coding, but I'm not a coder so I'm not sure.
YellowCakeKlan is offline
YellowCakeKlan
Junior Member
Join Date: Aug 2008
Old 08-23-2008 , 17:22   Re: CSS Anti-Stuck
Reply With Quote #19

L 08/23/2008 - 14:11:41: [SM] Native "HookEvent" reported: Game event "round_freeze_end" does not exist
L 08/23/2008 - 14:11:41: [SM] Debug mode is not enabled for "zm_stuck.smx"
L 08/23/2008 - 14:11:41: [SM] To enable debug mode, edit plugin_settings.cfg, or type: sm plugins debug 33 on
YellowCakeKlan is offline
YellowCakeKlan
Junior Member
Join Date: Aug 2008
Old 08-23-2008 , 18:04   Re: CSS Anti-Stuck
Reply With Quote #20

I manages to get it semi-working by changing a few things in the code. I just got rid of the line in the code that was giving me the error message.

It teleports the player now, however it teleports them into the ground! Not into a spawn. I think the line that I got rid of might be the one that records where the spawns are, so that might be why.

Here's the new code:

Code:
#pragma semicolon 1

#include <sourcemod>
#include <usermessages>
#include <bitbuffer>
#include <events>
#include <entity>

public Plugin:myinfo =
{
name = "ZM-Stuck",
author = "devicenull",
description = "Anti-Stuck",
version = "1.0.0.0",
url = "http://www.lunixmonster.org/"
};

#define MAX_PLAYERS 32+1

//Maximum number of spawn locations to record
#define MAX_SPAWNS 16

//Number of teleports remaining for each player
new TeleRemain[MAX_PLAYERS];

//Stored spawn locations
new Float:SpawnLoc[MAX_SPAWNS][3];
new nxtSpawn;

//Next spawn location to use when someone is stuck
new useSpawn;

//Offset to absolute position
new off_AbsPos;

new Handle:cTeleNum;

public OnPluginStart()
{
RegConsoleCmd("say",saycmd);
cTeleNum = CreateConVar("zm_teleportcount","3","Number of times to allow a user to teleport per round");
off_AbsPos = FindSendPropOffs("CBaseEntity","m_vecOrigin");
PrintToServer("Offset is %i",off_AbsPos);
}

public OnClientPutInServer(client)
{
//Reset the players spawns when they join
TeleRemain[client] = GetConVarInt(cTeleNum);
}

/*
* Reset all players teleport count
* Store the locations of spawns
*/
//public dev_round_begin()
public round_begin(Handle:event, const String:name[], bool:dontBroadcast)
{
decl Float:tloc[3];
nxtSpawn = 0;
for (new i=1;i<GetMaxClients();++i)
{
TeleRemain[i] = GetConVarInt(cTeleNum);
if (IsClientInGame(i) && i<MAX_SPAWNS)
{
GetEntDataVector(i,off_AbsPos,tloc);
SpawnLoc[nxtSpawn][0] = tloc[0];
SpawnLoc[nxtSpawn][1] = tloc[1];
SpawnLoc[nxtSpawn][2] = tloc[2];
//PrintToServer("Got spawn location: %f,%f,%f",tloc[0],tloc[1],tloc[2]);
++nxtSpawn;
}
}
if (nxtSpawn != 0) useSpawn = useSpawn % nxtSpawn;
CPrint(0,"Stuck? say !stuck");
}

public Action:saycmd(client, args)
{ //Arg0 is "say"

decl String:arg1[32];
GetCmdArg(1,arg1,32);

//Show the player their current position
if (strcmp(arg1,"whereami",false) == 0)
{
decl Float:loc[3];
GetEntDataVector(client,off_AbsPos,loc);

CPrint(client,"Your position is: x=%f y=%f z=%f",loc[0],loc[1],loc[2]);
return Plugin_Handled;
}
else if (strcmp(arg1,"!stuck",false) == 0 || strcmp(arg1,"/stuck",false) == 0
|| strcmp(arg1,"!teleport",false) == 0 || strcmp(arg1,"/teleport",false) == 0)
{
//If a player gets stuck, teleport them back to one of the spawn locations
if (TeleRemain[client] > 0)
{
--TeleRemain[client];
SetEntDataVector(client,off_AbsPos,SpawnLoc[useSpawn]);
useSpawn = (++useSpawn) % nxtSpawn;
CPrint(client,"You have %i / %i teleports remaining for this round",TeleRemain[client],GetConVarInt(cTeleNum));
}
else
{
CPrint(client,"You have used up your teleports for this round");
}
return Plugin_Handled;
}
else if (strcmp(arg1,"!zstuck",false) == 0 || strcmp(arg1,"/zstuck") == 0)
{
CPrint(client,"If you are stuck in an object, use !stuck ... not !zstuck");
}
return Plugin_Continue;
}

stock CPrint(client,String:tosend[],{Float,String,_}:...)
{
decl String:buff[512];
VFormat(buff,512,tosend,3);
decl Handle:msg;
if (client == 0) msg = StartMessageAll("SayText",0);
else msg = StartMessageOne("SayText",client,0);
BfWriteByte(msg,0);
BfWriteString(msg,buff);
BfWriteByte(msg,1);
EndMessage();
}
YellowCakeKlan 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 07:28.


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