Quote:
Originally Posted by Zyten
Thx m8 works perfect. !redie plugin
can u make this too !noclipme for dead ppl only with same command toggle on off. also if u can make !sloc to be to dead ppl too
|
Code:
public void OnPluginStart()
{
RegConsoleCmd("sm_sloc", SM_SaveLoc);
RegConsoleCmd("sm_tpme", SM_TeleportMe);
RegConsoleCmd("sm_noclipme", SM_Noclipme);
}
public Action SM_SaveLoc(int client, int args)
{
GetClientAbsOrigin(client, g_savedOrg[client]);
GetClientAbsAngles(client, g_savedAng[client]);
ReplyToCommand(client, "Your location has been saved.");
return Plugin_Handled;
}
public Action SM_TeleportMe(int client, int args)
{
if (IsPlayerAlive(client))
{
ReplyToCommand(client, "You can't teleport while your are alive.");
return Plugin_Handled;
}
TeleportEntity(client, g_savedOrg[client], g_savedAng[client], NULL_VECTOR);
ReplyToCommand(client, "You have been teleported to your saved location.");
return Plugin_Handled;
}
public Action SM_Noclipme(int client, int args)
{
if (IsPlayerAlive(client))
{
ReplyToCommand(client, "You can't use noclip while you are alive.");
return Plugin_Handled;
}
if (GetEntityMoveType(client) == MOVETYPE_WALK)
{
SetEntityMoveType(client, MOVETYPE_NOCLIP);
ReplyToCommand(client, "Noclip is now on.");
}
else
{
SetEntityMoveType(client, MOVETYPE_WALK);
ReplyToCommand(client, "Noclip is now off.");
}
return Plugin_Handled;
}
I posted the noclip on your other post, but here you go, i added your request to the teleport, and added the noclip.
__________________