求解这个小插件
lua吧
全部回复
仅看楼主
level 2
wsdddr 楼主
if CLIENT then return end
print( "[CP AntiTK] Enabled\n" )
-- Anti-TeamKill for Civil Protection jobs.
function CPAntiTK( vict, att )
if vict:IsPlayer() and att:IsPlayer() and IsValid( vict ) and IsValid( att ) then
if ( vict:isCP() ) and ( att:isCP() ) and not ( vict == att ) then
print( "[CP AntiTK] CP " .. att:Nick() .. " (" .. att:SteamID() .. ") attempted to damage CP " .. vict:Nick() .. " (" .. vict:SteamID() .. "), negating.\n" )
return false
end
end
end
hook.Add("PlayerShouldTakeDamage", "cpantiteamkill", CPAntiTK )
里面的各种用法 比如hook.add
2015年10月30日 03点10分 1
level 11
什么东西的插件?
2015年10月31日 00点10分 2
一个游戏的 目的是防止同队伤害
2015年10月31日 09点10分
@wsdddr 什么游戏?[啊]不同的lua解释器是拥有不同的库的
2015年10月31日 14点10分
1