test.sp
unknown
php
3 years ago
913 B
7
Indexable
#pragma semicolon 1
#pragma newdecls required
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
#define PLUGIN_VERSION "1.0"
public Plugin myinfo =
{
name = "test",
version = PLUGIN_VERSION,
description = "test",
author = "test",
url = "https://forums.alliedmods.net"
}
public void OnPluginStart()
{
LoadTranslations("test.phrases");
RegConsoleCmd("sm_test", Cmd_test);
}
public Action Cmd_test(int client, int args)
{
// 只有這位玩家能看到訊息,對象只有一位,使用%T
PrintToChat(client, "你會看到的語言為 %T", "TEST_1", client);
// 全體玩家能看到訊息,對象有包含兩位以上,使用%t
PrintToChatAll("你會看到的語言為 %t", "TEST_1");
PrintToChat(client, "%T", "TEST_2", client, client, "ABCD", 123, 2.56);
PrintToChatAll("%t", "TEST_2", client, "ABCD", 123, 2.56);
return Plugin_Handled;
}Editor is loading...