I tried making a plugin that works like this, On command admin will change it's player model to the targetted client model but it doesnt work.. This is the script please help me
Code:
#include <sourcemod>
#include <sdktools_functions>
#define PLUGIN_VERSION "1.0"
public Plugin:myinfo =
{
name = "L4D Mystique",
author = "CONGO LaLa",
description = "Transform Self To Targetted Model",
version = PLUGIN_VERSION,
url = "http://sourcemod.net"
}
new String:OldModel[255]
new String:TargetModel[255]
public OnPluginStart()
{
CreateConVar("sm_mystique_version", PLUGIN_VERSION);
RegAdminCmd("sm_mystique", Transform, ADMFLAG_SLAY);
}
public Action:Transform(client, args)
{
new x = 1
new y = 1
GetClientModel(y, OldModel[y], 255);
if (IsClientInGame(y))
{
GetClientAimTarget(y, true);
GetClientModel(x, TargetModel[x], 255);
if (IsPlayerAlive(y))
{
SetEntityModel(y, TargetModel[x]);
}
}
}
//GetClientModel(client, String:model[], maxlen);
//SetEntityModel(entity, const String:model[]);
//GetClientAimTarget(client, bool:only_clients=true);