[SourceMod] 인질, 인질구출지역, 폭파장소, 구매지점 삭제
플러그인을 만들다 보면 필요할 때가 의외로 많은 부분입니다.
각 Entity 정보는 https://developer.valvesoftware.com/wiki/Category:Counter-Strike:_Source_Entities 에서 확인 가능합니다.
public OnPluginStart()
{
HookEvent("round_start", Event_OnRoundStart);
}
public Action:Event_OnRoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
new maxent = GetMaxEntities(), String:entname[64];
for (new i = MaxClients; i < maxent; i++)
{
if (IsValidEdict(i) && IsValidEntity(i))
{
GetEdictClassname(i, entname, sizeof(entname));
if (StrContains(entname, "hostage_entity") != -1 || StrContains(entname, "func_bomb_target") != -1 || StrContains(entname, "func_buyzone") != -1 || StrContains(entname, "func_hostage_rescue") != -1)
RemoveEdict(i);
}
}
return Plugin_Continue;
}
'Info/Tips > Programming' 카테고리의 다른 글
| [SourceMod] 삼각함수를 이용해서 기하 움직임을 표현해보자 (0) | 2015.01.29 |
|---|---|
| [SourceMod] 소스모드 1.7.0 부터 추가된 문법에 관해 (1) | 2015.01.23 |
| [SourceMod] MOTD 패널을 심화적으로 다루기 (0) | 2015.01.22 |
| [SourceMod] TextMsg 이벤트 이용하여 메세지 삭제 (0) | 2015.01.22 |
| [SourceMod] base64 인코딩/디코딩 라이브러리 (0) | 2015.01.22 |