Diff
checker
텍스트
텍스트
이미지
문서
Excel
폴더
Legal
Enterprise
데스크톱
요금제
로그인
데스크톱 앱 다운로드
텍스트 비교
두 텍스트 파일의 차이점을 찾아보세요
도구
기록
실시간 편집
변경 없는 행 숨기기
줄바꿈 비활성화
레이아웃
나란히 보기
합쳐 보기
비교 단위
스마트
단어
글자
구문 강조
언어 선택
제외
텍스트 변환
첫 변경으로
수정
Diffchecker Desktop
가장 안전하게 Diffchecker를 사용하는 방법. 데스크톱 앱을 사용하면 비교 데이터가 외부로 전송되지 않습니다!
데스크톱 앱 받기
Copy4u.pl ;)
생성일
3년 전
비교 결과 만료 없음
초기화
내보내기
공유
설명
44 삭제
행
총
삭제
글자
총
삭제
이 기능을 계속 사용하려면 업그레이드해 주세요
Diff
checker
Pro
요금제 보기
296 행
복사
86 추가
행
총
추가
글자
총
추가
이 기능을 계속 사용하려면 업그레이드해 주세요
Diff
checker
Pro
요금제 보기
333 행
복사
// Ignored xs__ variables
// Ignored xs__ variables
#pragma semicolon 1
#pragma semicolon 1
#pragma ctrlchar '\'
#pragma ctrlchar '\'
new MaxClients;
new MaxClients;
복사
복사됨
복사
복사됨
new MapName[64];
new NULL_STRING[1];
new NULL_STRING[1];
new Float:NULL_VECTOR[3];
new Float:NULL_VECTOR[3];
복사
복사됨
복사
복사됨
new
TeamName
[4][] =
new
TeamColor
[4][] =
{
{
"",
"",
"TERRORIST",
"TERRORIST",
"CT",
"CT",
"SPECTATOR"
"SPECTATOR"
};
};
복사
복사됨
복사
복사됨
new
g_szSciezkiCzapek[2][46
] =
new
name[11
] =
{
{
복사
복사됨
복사
복사됨
"models/czapki_
d0naciak
/czapki_
d0naciak
_v1.mdl",
90, 69, 58, 32, 67, 122, 97, 112, 107, 105, 0
"models/czapki_
d0naciak
/czapki_
d0naciak
_v2.mdl"
}
new version[4] =
{
49, 46, 48, 0
}
new author[7] =
{
100, 114, 101, 100, 101, 107, 0
}
new url_author[19] =
{
104, 116, 116, 112, 115, 58, 47, 47, 97, 109, 120, 120, 52, 117, 46, 112, 108, 47, 0
}
new g_szSciezkiCzapek[3][45] =
{
"models/czapki_
amxx4u/v1
/czapki_
amxx4u
_v1.mdl",
"models/czapki_
amxx4u/v1
/czapki_
amxx4u
_v2.mdl"
,
"models/czapki_amxx4u/v1/czapki_amxx4u_v3.mdl"
};
};
복사
복사됨
복사
복사됨
new g_szListaCzapek[
44
][4][0];
new g_szListaCzapek[
76
][4][0];
new g_iCzapkaGracza[33];
new g_iCzapkaGracza[33];
fm_find_ent_by_owner(index, String:classname[], owner, jghgtype)
fm_find_ent_by_owner(index, String:classname[], owner, jghgtype)
{
{
new strtype[11];
new strtype[11];
복사
복사됨
복사
복사됨
strtype[0] =
276
;
strtype[0] =
20
;
new ent = index;
new ent = index;
switch (jghgtype)
switch (jghgtype)
{
{
case 1:
case 1:
{
{
복사
복사됨
복사
복사됨
strtype[0] =
316
;
strtype[0] =
60
;
}
}
case 2:
case 2:
{
{
복사
복사됨
복사
복사됨
strtype[0] =
344
;
strtype[0] =
88
;
}
}
default:
default:
{
{
}
}
}
}
/ * ERROR! Nie można rzutować obiektu typu 'Lysis.DSentinel' na typ 'Lysis.DReturn'. * /
/ * ERROR! Nie można rzutować obiektu typu 'Lysis.DSentinel' na typ 'Lysis.DReturn'. * /
function "fm_find_ent_by_owner"
function "fm_find_ent_by_owner"
fm_find_ent_by_owner(index, String:classname[], owner, jghgtype)
fm_find_ent_by_owner(index, String:classname[], owner, jghgtype)
ColorChat(id, Color:type, String:msg[])
ColorChat(id, Color:type, String:msg[])
{
{
!!! Removed Phi
!!! Removed Phi
new message[256];
new message[256];
switch (type)
switch (type)
{
{
case 1:
case 1:
{
{
message[0] = 1;
message[0] = 1;
}
}
case 2:
case 2:
{
{
message[0] = 4;
message[0] = 4;
}
}
default:
default:
{
{
message[0] = 3;
message[0] = 3;
}
}
}
}
vformat(message[1], 251, msg, 4);
vformat(message[1], 251, msg, 4);
복사
복사됨
복사
복사됨
message[19
1
] = 0;
message[19
2
] = 0;
new team = 0;
new team = 0;
new ColorChange = 0;
new ColorChange = 0;
new index = 0;
new index = 0;
new MSG_Type = 0;
new MSG_Type = 0;
if (id)
if (id)
{
{
MSG_Type = 1;
MSG_Type = 1;
index = id;
index = id;
}
}
else
else
{
{
index = FindPlayer();
index = FindPlayer();
MSG_Type = 2;
MSG_Type = 2;
}
}
new var1 = Heap_4;
new var1 = Heap_4;
복사
복사됨
복사
복사됨
var1[0] =
500
;
var1[0] =
244
;
team = get_user_team(index, var1, 0);
team = get_user_team(index, var1, 0);
ColorChange = ColorSelection(index, MSG_Type, type);
ColorChange = ColorSelection(index, MSG_Type, type);
ShowColorMessage(index, MSG_Type, message);
ShowColorMessage(index, MSG_Type, message);
if (ColorChange)
if (ColorChange)
{
{
복사
복사됨
복사
복사됨
Team_Info(index, MSG_Type,
TeamName
[team][0][0]);
Team_Info(index, MSG_Type,
TeamColor
[team][0][0]);
}
}
return 0;
return 0;
}
}
ShowColorMessage(id, type, String:message[])
ShowColorMessage(id, type, String:message[])
{
{
복사
복사됨
복사
복사됨
!!! Removed Phi
static bool:saytext_used;
static get_user_msgid_saytext;
static get_user_msgid_saytext;
복사
복사됨
복사
복사됨
if (!
get_user_msgid_
saytext
)
if (!
saytext
_used
)
{
{
get_user_msgid_saytext = get_user_msgid("SayText");
get_user_msgid_saytext = get_user_msgid("SayText");
복사
복사됨
복사
복사됨
saytext_used = 1;
}
}
복사
복사됨
복사
복사됨
message_begin(type, get_user_msgid_saytext,
540
, id);
message_begin(type, get_user_msgid_saytext,
288
, id);
write_byte(id);
write_byte(id);
write_string(message);
write_string(message);
message_end();
message_end();
return 0;
return 0;
}
}
Team_Info(id, type, String:team[])
Team_Info(id, type, String:team[])
{
{
!!! Removed Phi
!!! Removed Phi
static bool:teaminfo_used;
static bool:teaminfo_used;
static get_user_msgid_teaminfo;
static get_user_msgid_teaminfo;
if (!teaminfo_used)
if (!teaminfo_used)
{
{
get_user_msgid_teaminfo = get_user_msgid("TeamInfo");
get_user_msgid_teaminfo = get_user_msgid("TeamInfo");
teaminfo_used = 1;
teaminfo_used = 1;
}
}
복사
복사됨
복사
복사됨
message_begin(type, get_user_msgid_teaminfo,
540
, id);
message_begin(type, get_user_msgid_teaminfo,
288
, id);
write_byte(id);
write_byte(id);
write_string(team);
write_string(team);
message_end();
message_end();
return 1;
return 1;
}
}
ColorSelection(index, type, Color:Type)
ColorSelection(index, type, Color:Type)
{
{
switch (Type)
switch (Type)
{
{
case 4:
case 4:
{
{
복사
복사됨
복사
복사됨
new var1 =
TeamName
;
new var1 =
TeamColor
;
return Team_Info(index, type, var1[0][0][var1]);
return Team_Info(index, type, var1[0][0][var1]);
}
}
case 5:
case 5:
{
{
복사
복사됨
복사
복사됨
return Team_Info(index, type,
TeamName
[1][0]);
return Team_Info(index, type,
TeamColor
[1][0]);
}
}
case 6:
case 6:
{
{
복사
복사됨
복사
복사됨
return Team_Info(index, type,
TeamName
[2][0]);
return Team_Info(index, type,
TeamColor
[2][0]);
}
}
default:
default:
{
{
return 0;
return 0;
}
}
}
}
}
}
FindPlayer()
FindPlayer()
{
{
new i = -1;
new i = -1;
복사
복사됨
복사
복사됨
static iMaxPlayers;
while (get_maxplayers() >= i)
if (!iMaxPlayers)
{
iMaxPlayers = get_maxplayers();
while (i <= iMaxPlayers)
{
i++;
if (is_user_connected(i))
{
return i;
}
}
return -1;
}
while (i <= iMaxPlayers)
{
{
i++;
i++;
if (is_user_connected(i))
if (is_user_connected(i))
{
{
return i;
return i;
}
}
}
}
return -1;
return -1;
}
}
public plugin_init()
public plugin_init()
{
{
복사
복사됨
복사
복사됨
register_plugin("
Czapki", "
0.1
", "
SgtBane, K!113r & d0naciak
",
"", "");
register_plugin("
ZE:
Czapki", "
1.0
", "
dredek
",
url_author
);
register_clcmd("say /czapki", "cmd_Czapki", -1, "", -1, MaxClients
);
register_clcmd("say /
models
", "cmd_Czapki", -1, "", -1, MaxClients);
register_clcmd("say /
hats
", "cmd_Czapki", -1, "", -1, MaxClients);
return 0;
return 0;
}
}
public plugin_natives()
public plugin_natives()
{
{
register_native("hats_menu", "cmd_Czapki", 1);
register_native("hats_menu", "cmd_Czapki", 1);
복사
복사됨
복사
복사됨
register_native("set_user_hat", "nat_UstawCzapke", 1);
return 0;
}
public nat_UstawCzapke(id, iModel, iSubModel)
{
!!! Removed Phi
new iEnt = fm_find_ent_by_owner(0, "hat_jb", id, 0);
new bool:bMial = 1;
if (0 >= iEnt)
{
iEnt = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"));
bMial = 0;
}
if (0 < iEnt)
{
if (!bMial)
{
set_pev(iEnt, pev_classname, "hat_jb");
set_pev(iEnt, pev_movetype, 12);
set_pev(iEnt, pev_solid, 0);
set_pev(iEnt, pev_aiment, id);
set_pev(iEnt, pev_owner, id);
set_pev(iEnt, pev_rendermode, 0);
}
engfunc(EngFunc_SetModel, iEnt, g_szSciezkiCzapek[iModel][0][0]);
set_pev(iEnt, pev_body, iSubModel);
}
return 0;
return 0;
}
}
public plugin_precache()
public plugin_precache()
{
{
new i = 0;
new i = 0;
복사
복사됨
복사
복사됨
while (i <
2
)
while (i <
3
)
{
{
precache_model(g_szSciezkiCzapek[i][0][0]);
precache_model(g_szSciezkiCzapek[i][0][0]);
i++;
i++;
}
}
return 0;
return 0;
}
}
복사
복사됨
복사
복사됨
public client_disconnect
(id)
public client_disconnect
ed
(id)
{
{
Set_Hat(id, 0, false);
Set_Hat(id, 0, false);
return 0;
return 0;
}
}
public cmd_Czapki(id)
public cmd_Czapki(id)
{
{
new szItem[128];
new szItem[128];
new iMenu = 0;
new iMenu = 0;
new var2 = g_iCzapkaGracza;
new var2 = g_iCzapkaGracza;
new var1;
new var1;
if (!var2[id][0][0])
if (!var2[id][0][0])
{
{
copy(szItem, 127, "\yTwoja czapka:\d Brak\n\nWybierz czapke:");
copy(szItem, 127, "\yTwoja czapka:\d Brak\n\nWybierz czapke:");
var1 = var2;
var1 = var2;
}
}
else
else
{
{
new var3 = g_szListaCzapek[g_iCzapkaGracza[id][0][0]][0][0];
new var3 = g_szListaCzapek[g_iCzapkaGracza[id][0][0]][0][0];
formatex(szItem, 127, "\yTwoja czapka:\r %s\n\n\yWybierz czapke:", var3[0][var3]);
formatex(szItem, 127, "\yTwoja czapka:\r %s\n\n\yWybierz czapke:", var3[0][var3]);
var1 = var3;
var1 = var3;
}
}
iMenu = menu_create(szItem, "Czapki_Handler", 0);
iMenu = menu_create(szItem, "Czapki_Handler", 0);
menu_additem(iMenu, "\yZdejmij czapke", "", 0, -1);
menu_additem(iMenu, "\yZdejmij czapke", "", 0, -1);
new i = 0;
new i = 0;
복사
복사됨
복사
복사됨
while (i <
44
)
while (i <
76
)
{
{
new var4 = g_szListaCzapek[i][0][0];
new var4 = g_szListaCzapek[i][0][0];
menu_additem(iMenu, var4[0][var4], "", 0, -1);
menu_additem(iMenu, var4[0][var4], "", 0, -1);
i++;
i++;
}
}
menu_setprop(iMenu, 3, "Dalej");
menu_setprop(iMenu, 3, "Dalej");
menu_setprop(iMenu, 2, "Powrot");
menu_setprop(iMenu, 2, "Powrot");
menu_setprop(iMenu, 4, "Wyjscie");
menu_setprop(iMenu, 4, "Wyjscie");
menu_display(id, iMenu, 0, -1);
menu_display(id, iMenu, 0, -1);
return 1;
return 1;
}
}
/ * ERROR! control flow graph is not reducible * /
/ * ERROR! control flow graph is not reducible * /
function "Czapki_Handler"
function "Czapki_Handler"
public Czapki_Handler(id, iMenu, iItem)
public Czapki_Handler(id, iMenu, iItem)
Set_Hat(id, iCzapka, bool:bCzyPolaczony)
Set_Hat(id, iCzapka, bool:bCzyPolaczony)
{
{
!!! Removed Phi
!!! Removed Phi
if (iCzapka)
if (iCzapka)
{
{
if (g_szListaCzapek[iCzapka][0][0][2] && !read_flags(g_szListaCzapek[iCzapka][0][0][2]) & get_user_flags(id, 0))
if (g_szListaCzapek[iCzapka][0][0][2] && !read_flags(g_szListaCzapek[iCzapka][0][0][2]) & get_user_flags(id, 0))
{
{
return 0;
return 0;
}
}
new iEnt = fm_find_ent_by_owner(0, "hat_jb", id, 0);
new iEnt = fm_find_ent_by_owner(0, "hat_jb", id, 0);
new bool:bMial = 1;
new bool:bMial = 1;
if (0 >= iEnt)
if (0 >= iEnt)
{
{
iEnt = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"));
iEnt = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"));
bMial = 0;
bMial = 0;
}
}
if (0 < iEnt)
if (0 < iEnt)
{
{
if (!bMial)
if (!bMial)
{
{
set_pev(iEnt, pev_classname, "hat_jb");
set_pev(iEnt, pev_classname, "hat_jb");
set_pev(iEnt, pev_movetype, 12);
set_pev(iEnt, pev_movetype, 12);
set_pev(iEnt, pev_solid, 0);
set_pev(iEnt, pev_solid, 0);
set_pev(iEnt, pev_aiment, id);
set_pev(iEnt, pev_aiment, id);
set_pev(iEnt, pev_owner, id);
set_pev(iEnt, pev_owner, id);
set_pev(iEnt, pev_rendermode, 0);
set_pev(iEnt, pev_rendermode, 0);
}
}
engfunc(EngFunc_SetModel, iEnt, g_szSciezkiCzapek[g_szListaCzapek[iCzapka][0][0][3]][0][0]);
engfunc(EngFunc_SetModel, iEnt, g_szSciezkiCzapek[g_szListaCzapek[iCzapka][0][0][3]][0][0]);
set_pev(iEnt, pev_body, g_szListaCzapek[iCzapka][0][0][1]);
set_pev(iEnt, pev_body, g_szListaCzapek[iCzapka][0][0][1]);
}
}
복사
복사됨
복사
복사됨
new szNazwaCzapki[32];
new var2 = g_szListaCzapek[iCzapka][0][0];
new var2 = g_szListaCzapek[iCzapka][0][0];
복사
복사됨
복사
복사됨
ColorChat(id, Color:2, "[Czapki]\1 Zalozyles czapke:\3 %s", var
2
[0][var
2
]);
copy(szNazwaCzapki, 31, var2[0][var2]);
replace(szNazwaCzapki, 31, "\r", "");
replace(szNazwaCzapki, 31, "\y", "");
new var3 = g_szListaCzapek[iCzapka][0][0];
ColorChat(id, Color:2, "[Czapki]\1 Zalozyles czapke:\3 %s", var
3
[0][var
3
]);
}
}
else
else
{
{
new iEnt = fm_find_ent_by_owner(0, "hat_jb", id, 0);
new iEnt = fm_find_ent_by_owner(0, "hat_jb", id, 0);
if (0 < iEnt)
if (0 < iEnt)
{
{
engfunc(EngFunc_RemoveEntity, iEnt);
engfunc(EngFunc_RemoveEntity, iEnt);
}
}
if (bCzyPolaczony)
if (bCzyPolaczony)
{
{
ColorChat(id, Color:2, "[Czapki]\1 Zdjales czapke.");
ColorChat(id, Color:2, "[Czapki]\1 Zdjales czapke.");
}
}
}
}
g_iCzapkaGracza[id] = iCzapka;
g_iCzapkaGracza[id] = iCzapka;
return 1;
return 1;
}
}
저장된 비교 결과
원본
파일 열기
// Ignored xs__ variables #pragma semicolon 1 #pragma ctrlchar '\' new MaxClients; new MapName[64]; new NULL_STRING[1]; new Float:NULL_VECTOR[3]; new TeamName[4][] = { "", "TERRORIST", "CT", "SPECTATOR" }; new g_szSciezkiCzapek[2][46] = { "models/czapki_d0naciak/czapki_d0naciak_v1.mdl", "models/czapki_d0naciak/czapki_d0naciak_v2.mdl" }; new g_szListaCzapek[44][4][0]; new g_iCzapkaGracza[33]; fm_find_ent_by_owner(index, String:classname[], owner, jghgtype) { new strtype[11]; strtype[0] = 276; new ent = index; switch (jghgtype) { case 1: { strtype[0] = 316; } case 2: { strtype[0] = 344; } default: { } } / * ERROR! Nie można rzutować obiektu typu 'Lysis.DSentinel' na typ 'Lysis.DReturn'. * / function "fm_find_ent_by_owner" fm_find_ent_by_owner(index, String:classname[], owner, jghgtype) ColorChat(id, Color:type, String:msg[]) { !!! Removed Phi new message[256]; switch (type) { case 1: { message[0] = 1; } case 2: { message[0] = 4; } default: { message[0] = 3; } } vformat(message[1], 251, msg, 4); message[191] = 0; new team = 0; new ColorChange = 0; new index = 0; new MSG_Type = 0; if (id) { MSG_Type = 1; index = id; } else { index = FindPlayer(); MSG_Type = 2; } new var1 = Heap_4; var1[0] = 500; team = get_user_team(index, var1, 0); ColorChange = ColorSelection(index, MSG_Type, type); ShowColorMessage(index, MSG_Type, message); if (ColorChange) { Team_Info(index, MSG_Type, TeamName[team][0][0]); } return 0; } ShowColorMessage(id, type, String:message[]) { static get_user_msgid_saytext; if (!get_user_msgid_saytext) { get_user_msgid_saytext = get_user_msgid("SayText"); } message_begin(type, get_user_msgid_saytext, 540, id); write_byte(id); write_string(message); message_end(); return 0; } Team_Info(id, type, String:team[]) { !!! Removed Phi static bool:teaminfo_used; static get_user_msgid_teaminfo; if (!teaminfo_used) { get_user_msgid_teaminfo = get_user_msgid("TeamInfo"); teaminfo_used = 1; } message_begin(type, get_user_msgid_teaminfo, 540, id); write_byte(id); write_string(team); message_end(); return 1; } ColorSelection(index, type, Color:Type) { switch (Type) { case 4: { new var1 = TeamName; return Team_Info(index, type, var1[0][0][var1]); } case 5: { return Team_Info(index, type, TeamName[1][0]); } case 6: { return Team_Info(index, type, TeamName[2][0]); } default: { return 0; } } } FindPlayer() { new i = -1; static iMaxPlayers; if (!iMaxPlayers) { iMaxPlayers = get_maxplayers(); while (i <= iMaxPlayers) { i++; if (is_user_connected(i)) { return i; } } return -1; } while (i <= iMaxPlayers) { i++; if (is_user_connected(i)) { return i; } } return -1; } public plugin_init() { register_plugin("Czapki", "0.1", "SgtBane, K!113r & d0naciak", "", ""); register_clcmd("say /czapki", "cmd_Czapki", -1, "", -1, MaxClients); register_clcmd("say /hats", "cmd_Czapki", -1, "", -1, MaxClients); return 0; } public plugin_natives() { register_native("hats_menu", "cmd_Czapki", 1); return 0; } public plugin_precache() { new i = 0; while (i < 2) { precache_model(g_szSciezkiCzapek[i][0][0]); i++; } return 0; } public client_disconnect(id) { Set_Hat(id, 0, false); return 0; } public cmd_Czapki(id) { new szItem[128]; new iMenu = 0; new var2 = g_iCzapkaGracza; new var1; if (!var2[id][0][0]) { copy(szItem, 127, "\yTwoja czapka:\d Brak\n\nWybierz czapke:"); var1 = var2; } else { new var3 = g_szListaCzapek[g_iCzapkaGracza[id][0][0]][0][0]; formatex(szItem, 127, "\yTwoja czapka:\r %s\n\n\yWybierz czapke:", var3[0][var3]); var1 = var3; } iMenu = menu_create(szItem, "Czapki_Handler", 0); menu_additem(iMenu, "\yZdejmij czapke", "", 0, -1); new i = 0; while (i < 44) { new var4 = g_szListaCzapek[i][0][0]; menu_additem(iMenu, var4[0][var4], "", 0, -1); i++; } menu_setprop(iMenu, 3, "Dalej"); menu_setprop(iMenu, 2, "Powrot"); menu_setprop(iMenu, 4, "Wyjscie"); menu_display(id, iMenu, 0, -1); return 1; } / * ERROR! control flow graph is not reducible * / function "Czapki_Handler" public Czapki_Handler(id, iMenu, iItem) Set_Hat(id, iCzapka, bool:bCzyPolaczony) { !!! Removed Phi if (iCzapka) { if (g_szListaCzapek[iCzapka][0][0][2] && !read_flags(g_szListaCzapek[iCzapka][0][0][2]) & get_user_flags(id, 0)) { return 0; } new iEnt = fm_find_ent_by_owner(0, "hat_jb", id, 0); new bool:bMial = 1; if (0 >= iEnt) { iEnt = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target")); bMial = 0; } if (0 < iEnt) { if (!bMial) { set_pev(iEnt, pev_classname, "hat_jb"); set_pev(iEnt, pev_movetype, 12); set_pev(iEnt, pev_solid, 0); set_pev(iEnt, pev_aiment, id); set_pev(iEnt, pev_owner, id); set_pev(iEnt, pev_rendermode, 0); } engfunc(EngFunc_SetModel, iEnt, g_szSciezkiCzapek[g_szListaCzapek[iCzapka][0][0][3]][0][0]); set_pev(iEnt, pev_body, g_szListaCzapek[iCzapka][0][0][1]); } new var2 = g_szListaCzapek[iCzapka][0][0]; ColorChat(id, Color:2, "[Czapki]\1 Zalozyles czapke:\3 %s", var2[0][var2]); } else { new iEnt = fm_find_ent_by_owner(0, "hat_jb", id, 0); if (0 < iEnt) { engfunc(EngFunc_RemoveEntity, iEnt); } if (bCzyPolaczony) { ColorChat(id, Color:2, "[Czapki]\1 Zdjales czapke."); } } g_iCzapkaGracza[id] = iCzapka; return 1; }
수정본
파일 열기
// Ignored xs__ variables #pragma semicolon 1 #pragma ctrlchar '\' new MaxClients; new NULL_STRING[1]; new Float:NULL_VECTOR[3]; new TeamColor[4][] = { "", "TERRORIST", "CT", "SPECTATOR" }; new name[11] = { 90, 69, 58, 32, 67, 122, 97, 112, 107, 105, 0 } new version[4] = { 49, 46, 48, 0 } new author[7] = { 100, 114, 101, 100, 101, 107, 0 } new url_author[19] = { 104, 116, 116, 112, 115, 58, 47, 47, 97, 109, 120, 120, 52, 117, 46, 112, 108, 47, 0 } new g_szSciezkiCzapek[3][45] = { "models/czapki_amxx4u/v1/czapki_amxx4u_v1.mdl", "models/czapki_amxx4u/v1/czapki_amxx4u_v2.mdl", "models/czapki_amxx4u/v1/czapki_amxx4u_v3.mdl" }; new g_szListaCzapek[76][4][0]; new g_iCzapkaGracza[33]; fm_find_ent_by_owner(index, String:classname[], owner, jghgtype) { new strtype[11]; strtype[0] = 20; new ent = index; switch (jghgtype) { case 1: { strtype[0] = 60; } case 2: { strtype[0] = 88; } default: { } } / * ERROR! Nie można rzutować obiektu typu 'Lysis.DSentinel' na typ 'Lysis.DReturn'. * / function "fm_find_ent_by_owner" fm_find_ent_by_owner(index, String:classname[], owner, jghgtype) ColorChat(id, Color:type, String:msg[]) { !!! Removed Phi new message[256]; switch (type) { case 1: { message[0] = 1; } case 2: { message[0] = 4; } default: { message[0] = 3; } } vformat(message[1], 251, msg, 4); message[192] = 0; new team = 0; new ColorChange = 0; new index = 0; new MSG_Type = 0; if (id) { MSG_Type = 1; index = id; } else { index = FindPlayer(); MSG_Type = 2; } new var1 = Heap_4; var1[0] = 244; team = get_user_team(index, var1, 0); ColorChange = ColorSelection(index, MSG_Type, type); ShowColorMessage(index, MSG_Type, message); if (ColorChange) { Team_Info(index, MSG_Type, TeamColor[team][0][0]); } return 0; } ShowColorMessage(id, type, String:message[]) { !!! Removed Phi static bool:saytext_used; static get_user_msgid_saytext; if (!saytext_used) { get_user_msgid_saytext = get_user_msgid("SayText"); saytext_used = 1; } message_begin(type, get_user_msgid_saytext, 288, id); write_byte(id); write_string(message); message_end(); return 0; } Team_Info(id, type, String:team[]) { !!! Removed Phi static bool:teaminfo_used; static get_user_msgid_teaminfo; if (!teaminfo_used) { get_user_msgid_teaminfo = get_user_msgid("TeamInfo"); teaminfo_used = 1; } message_begin(type, get_user_msgid_teaminfo, 288, id); write_byte(id); write_string(team); message_end(); return 1; } ColorSelection(index, type, Color:Type) { switch (Type) { case 4: { new var1 = TeamColor; return Team_Info(index, type, var1[0][0][var1]); } case 5: { return Team_Info(index, type, TeamColor[1][0]); } case 6: { return Team_Info(index, type, TeamColor[2][0]); } default: { return 0; } } } FindPlayer() { new i = -1; while (get_maxplayers() >= i) { i++; if (is_user_connected(i)) { return i; } } return -1; } public plugin_init() { register_plugin("ZE: Czapki", "1.0", "dredek", url_author); register_clcmd("say /models", "cmd_Czapki", -1, "", -1, MaxClients); return 0; } public plugin_natives() { register_native("hats_menu", "cmd_Czapki", 1); register_native("set_user_hat", "nat_UstawCzapke", 1); return 0; } public nat_UstawCzapke(id, iModel, iSubModel) { !!! Removed Phi new iEnt = fm_find_ent_by_owner(0, "hat_jb", id, 0); new bool:bMial = 1; if (0 >= iEnt) { iEnt = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target")); bMial = 0; } if (0 < iEnt) { if (!bMial) { set_pev(iEnt, pev_classname, "hat_jb"); set_pev(iEnt, pev_movetype, 12); set_pev(iEnt, pev_solid, 0); set_pev(iEnt, pev_aiment, id); set_pev(iEnt, pev_owner, id); set_pev(iEnt, pev_rendermode, 0); } engfunc(EngFunc_SetModel, iEnt, g_szSciezkiCzapek[iModel][0][0]); set_pev(iEnt, pev_body, iSubModel); } return 0; } public plugin_precache() { new i = 0; while (i < 3) { precache_model(g_szSciezkiCzapek[i][0][0]); i++; } return 0; } public client_disconnected(id) { Set_Hat(id, 0, false); return 0; } public cmd_Czapki(id) { new szItem[128]; new iMenu = 0; new var2 = g_iCzapkaGracza; new var1; if (!var2[id][0][0]) { copy(szItem, 127, "\yTwoja czapka:\d Brak\n\nWybierz czapke:"); var1 = var2; } else { new var3 = g_szListaCzapek[g_iCzapkaGracza[id][0][0]][0][0]; formatex(szItem, 127, "\yTwoja czapka:\r %s\n\n\yWybierz czapke:", var3[0][var3]); var1 = var3; } iMenu = menu_create(szItem, "Czapki_Handler", 0); menu_additem(iMenu, "\yZdejmij czapke", "", 0, -1); new i = 0; while (i < 76) { new var4 = g_szListaCzapek[i][0][0]; menu_additem(iMenu, var4[0][var4], "", 0, -1); i++; } menu_setprop(iMenu, 3, "Dalej"); menu_setprop(iMenu, 2, "Powrot"); menu_setprop(iMenu, 4, "Wyjscie"); menu_display(id, iMenu, 0, -1); return 1; } / * ERROR! control flow graph is not reducible * / function "Czapki_Handler" public Czapki_Handler(id, iMenu, iItem) Set_Hat(id, iCzapka, bool:bCzyPolaczony) { !!! Removed Phi if (iCzapka) { if (g_szListaCzapek[iCzapka][0][0][2] && !read_flags(g_szListaCzapek[iCzapka][0][0][2]) & get_user_flags(id, 0)) { return 0; } new iEnt = fm_find_ent_by_owner(0, "hat_jb", id, 0); new bool:bMial = 1; if (0 >= iEnt) { iEnt = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target")); bMial = 0; } if (0 < iEnt) { if (!bMial) { set_pev(iEnt, pev_classname, "hat_jb"); set_pev(iEnt, pev_movetype, 12); set_pev(iEnt, pev_solid, 0); set_pev(iEnt, pev_aiment, id); set_pev(iEnt, pev_owner, id); set_pev(iEnt, pev_rendermode, 0); } engfunc(EngFunc_SetModel, iEnt, g_szSciezkiCzapek[g_szListaCzapek[iCzapka][0][0][3]][0][0]); set_pev(iEnt, pev_body, g_szListaCzapek[iCzapka][0][0][1]); } new szNazwaCzapki[32]; new var2 = g_szListaCzapek[iCzapka][0][0]; copy(szNazwaCzapki, 31, var2[0][var2]); replace(szNazwaCzapki, 31, "\r", ""); replace(szNazwaCzapki, 31, "\y", ""); new var3 = g_szListaCzapek[iCzapka][0][0]; ColorChat(id, Color:2, "[Czapki]\1 Zalozyles czapke:\3 %s", var3[0][var3]); } else { new iEnt = fm_find_ent_by_owner(0, "hat_jb", id, 0); if (0 < iEnt) { engfunc(EngFunc_RemoveEntity, iEnt); } if (bCzyPolaczony) { ColorChat(id, Color:2, "[Czapki]\1 Zdjales czapke."); } } g_iCzapkaGracza[id] = iCzapka; return 1; }
비교하기