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

Solved Noclip for dead ppl only


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Zyten
Senior Member
Join Date: Jan 2018
Old 06-09-2018 , 00:39   Noclip for dead ppl only
Reply With Quote #1

Looking for !noclipme for dead ppl only with same command toggle on off


Csgo

Last edited by Zyten; 06-11-2018 at 12:05.
Zyten is offline
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Old 06-09-2018 , 07:35   Re: Noclip for dead ppl only
Reply With Quote #2

Hello, you might wanna do some research before you make plugin requests and in this case there was already a plugin made for your benifits. https://forums.alliedmods.net/showthread.php?t=209155

An updated syntax:
Code:
#include <sourcemod>

#pragma semicolon 1

public void OnPluginStart()
{
	RegConsoleCmd("sm_noclipme", Cmd_Noclipme);
}

public Action Cmd_Noclipme(int client, int args)
{
	if (IsPlayerAlive(client))
		return Plugin_Handled;
	
	if (GetEntityMoveType(client) == MOVETYPE_WALK)
	{
		SetEntityMoveType(client, MOVETYPE_NOCLIP);
		return Plugin_Handled;
	}
	
	else if (GetEntityMoveType(client) == MOVETYPE_NOCLIP)
	{
		SetEntityMoveType(client, MOVETYPE_WALK);
		return Plugin_Handled;
	}
	
	return Plugin_Stop;
}

Last edited by mug1wara; 06-09-2018 at 14:23. Reason: just fixed some stuff
mug1wara is offline
Zyten
Senior Member
Join Date: Jan 2018
Old 06-09-2018 , 11:26   Re: Noclip for dead ppl only
Reply With Quote #3

yesterday i toggled every plugin there and i saw that plugin link u send me dosent meet my needs if its for alive, need him to stay dead and to noclip as dead. i will test your now

Last edited by Zyten; 06-09-2018 at 11:29.
Zyten is offline
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Old 06-09-2018 , 11:51   Re: Noclip for dead ppl only
Reply With Quote #4

I just started thinking, why the hell should you use noclip on dead people? Isn't there already a command that allows it while spectating / when dead?
mug1wara is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 06-09-2018 , 11:56   Re: Noclip for dead ppl only
Reply With Quote #5

I thought that dead people become observers, which means they can roam freely with their camera/screen...
__________________
Psyk0tik is offline
Zyten
Senior Member
Join Date: Jan 2018
Old 06-09-2018 , 12:29   Re: Noclip for dead ppl only
Reply With Quote #6

This will explain it !redie jailbreak server sometimes need noclip to move free

tested your script does nothing

Last edited by Zyten; 06-09-2018 at 12:53.
Zyten is offline
KlausLaw
AlliedModders Donor
Join Date: Feb 2018
Location: Israel
Old 06-09-2018 , 12:58   Re: Noclip for dead ppl only
Reply With Quote #7

Code:
public void OnPluginStart()
{
	RegConsoleCmd("sm_noclipme", SM_Noclipme);
}

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;
}
Enjoy.
__________________
Taking private requests


Last edited by KlausLaw; 06-09-2018 at 12:58.
KlausLaw 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 14:24.


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