inital commit

This commit is contained in:
Giovanni Harting
2015-05-02 23:52:19 +02:00
parent 1a038457d4
commit 45b2c6cfff
49 changed files with 14069 additions and 0 deletions

42
ask4connect.sp Normal file
View File

@@ -0,0 +1,42 @@
/* Plugin Template generated by Pawn Studio */
#include <sourcemod>
new Handle:cv_ip, Handle:cv_port;
public Plugin:myinfo =
{
name = "Ask4Connect",
author = "Chefe",
description = "Redirect your players (if they want) to another server",
version = "1.0",
url = "www.chefgaming.de"
}
public OnPluginStart()
{
cv_ip = CreateConVar("sm_a4c_ip", "0.0.0.0", "Set to witch IP the client should be asked to connect to.");
cv_port = CreateConVar("sm_a4c_port", "27015", "Set the port the client should be asked to connect to.");
AutoExecConfig(true);
}
public OnClientConnected(client)
{
CreateTimer(10.0, DisplayAsk, client);
}
public Action:DisplayAsk(Handle:timer, any:data)
{
if (IsClientConnected(data))
{
new String:ip[50];
GetConVarString(cv_ip, ip, sizeof(ip));
new String:port[10];
GetConVarString(cv_port, port, sizeof(port));
new String:destination[50];
Format(destination, sizeof(destination), "%s:%s", ip, port);
DisplayAskConnectBox(data, 120.0, destination);
PrintToChat(data, "\x04Our server has moved to an other IP address, pls use the connection box displayed now upper left and save the new server IP: %s!!!", destination);
}
}