發新話題
打印

插件一問,高手幫幫手

[Close]

插件一問,高手幫幫手

#include <sourcemod>
#include <sdktools>

public Plugin:myinfo =
{
    name = "Left 4 Dead Teamkill disable",
    author = "Joshua Coffey",
    description = "Kills TKers",
    version = "2.0.0.0",
    url = "http://www.sourcemod.net/"
};


public OnPluginStart()
{
   HookEvent("player_incapacitated", Event_PlayerIncapacitated)

}

public Event_PlayerIncapacitated(Handle:event, const String:name[], bool:dontBroadcast)
{
   new victim_id = GetEventInt(event, "userid")
   new attacker_id = GetEventInt(event, "attacker")

   new victim = GetClientOfUserId(victim_id)
   new attacker = GetClientOfUserId(attacker_id)
   


if (GetClientTeam(victim) == GetClientTeam(attacker)){
    ForcePlayerSuicide(attacker);
    PrintToChatAll ("TEAMKILLER IS DEAD);
}



呢個係一個TK人要死既插件,不過
我想問呢個TEAMKILLER點改做殺死人個個名,麻煩幫幫手!

TOP

PrintToChatAll ("TEAMKILLER %N IS DEAD,attacker);
CPT 插件開發隊長

TOP

呢句我都試過,不過點解COMPILE唔到既......

[ 本帖最後由 Ivanlau2652 於 2012-7-11 16:24 編輯 ]

TOP

PrintToChatAll ("TEAMKILLER %N IS DEAD,attacker);
to
PrintToChatAll ("TEAMKILLER %N IS DEAD",attacker);
CPT 插件開發隊長

TOP

唔該哂!HAHA

TOP

發新話題