Diff
checker
文本
文本
圖像
文檔
Excel
文件夾
Legal
Enterprise
桌面版
定價
登入
下載 Diffchecker 桌面版
比較文本
尋找兩個文字檔案之間的差異
工具
歷史
即時編輯器
摺疊未變更行
關閉換行
檢視
拆分
統一
比對精度
智能
單詞
字符
語法突出顯示
選擇語法
忽略
文字轉換
前往第一個差異
編輯輸入
Diffchecker Desktop
執行Diffchecker最安全的方式。取得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; }
尋找差異