View Single Post
PresidentEvil
AlliedModders Donor
Join Date: Jun 2012
Old 06-05-2014 , 14:35   Re: [CS:GO] Thirdperson
Reply With Quote #7

Quote:
Originally Posted by thecount View Post
PHP Code:
#include <sourcemod>

public OnPluginStart(){
RegConsoleCmd("sm_tp"Command_Thirdperson"Sets thirdperson.");
RegConsoleCmd("sm_fp"Command_Firstperson"Sets firstperson.");
}

public 
Action:Command_Thirdperson (clientargs){
if(
IsPlayerAlive(client)){
PrintToChat(client"[SM] Thirdperson");
ClientCommand(client"thirdperson");
}else{
PrintToChat(client"[SM] Not alive.");
}
return 
Plugin_Handled;
}

public 
Action:Command_Firstperson (clientargs){
if(
IsPlayerAlive(client)){
PrintToChat(client"[SM] Firstperson");
ClientCommand(client"firstperson");
}else{
PrintToChat(client"[SM] Not alive.");
}
return 
Plugin_Handled;

Works?
by default it doesn't work, the message pops up but you're still in firstperson, I had to set sv_cheats to 1 and then it works fine

I set sv_cheats back to 0, and the plugin still works, so I guess it needs a workaround when the plugin loads to set sv_cheats to 1 then back to 0 immediately, idk
__________________

Last edited by PresidentEvil; 06-05-2014 at 14:38.
PresidentEvil is offline