PHP Code:
#include <sourcemod>
public OnPluginStart(){
RegConsoleCmd("sm_tp", Command_Thirdperson, "Sets thirdperson.");
RegConsoleCmd("sm_fp", Command_Firstperson, "Sets firstperson.");
}
public Action:Command_Thirdperson (client, args){
if(IsPlayerAlive(client)){
PrintToChat(client, "[SM] Thirdperson");
ClientCommand(client, "thirdperson");
}else{
PrintToChat(client, "[SM] Not alive.");
}
return Plugin_Handled;
}
public Action:Command_Firstperson (client, args){
if(IsPlayerAlive(client)){
PrintToChat(client, "[SM] Firstperson");
ClientCommand(client, "firstperson");
}else{
PrintToChat(client, "[SM] Not alive.");
}
return Plugin_Handled;
}
Works?