so like this?
PHP Code:
#pragma semicolon 1
#define DEBUG
#define PLUGIN_AUTHOR ""
#define PLUGIN_VERSION "0.00"
#include <sourcemod>
#include <sdktools>
#include <cstrike>
//#include <sdkhooks>
#pragma newdecls required
public Plugin myinfo =
{
name = "",
author = PLUGIN_AUTHOR,
description = "",
version = PLUGIN_VERSION,
url = ""
};
public void OnPluginStart()
{
RegAdminCmd("sm_tp", tp, ADMFLAG_KICK);
}
public Action tp(int client, int args)
{
if(args < 0)
{
ReplyToCommand(client, "[SM] tp <client>");
return Plugin_Handled;
}
float origin[3];
GetClientAbsOrigin(client, origin);
char Enteredname[30];
GetCmdArg(1, Enteredname, sizeof(Enteredname));
char Clientname[30];
for (int i = 1; i <= MaxClients; i++){
GetClientName(i, Clientname, sizeof(Clientname));
if(StrEqual(Enteredname,Clientname)){
if(IsClientConnected(i)){
if(IsPlayerAlive(i))
{
PrintToChat(client, "\x04 You Teleported \x03 %s",Clientname);
PrintToChat(i, "\x03 %s Teleported \x04 You",client);
TeleportEntity(i, origin, NULL_VECTOR, NULL_VECTOR);
break;
}
else
{
ReplyToCommand(client, "Please Enter A Alive Player");
break;
}
}
}
}
return Plugin_Handled;
}