
15.11.2015, 15:30
|
|
Участник форума
Регистрация: 09.03.2015
Сообщений: 218
С нами:
5884065
Репутация:
0
|
|
Пытался перевести админ чекер на сф апи, не получилось.
Скажите пожалуйста что тут не так?
PHP:
Код:
bool admchecker
;
int count
=
false
;
stFontInfo
*
pFont
;
bool
CALLBACK
Present
(
CONST
RECT
*
pSourceRect
,
CONST
RECT
*
pDestRect
,
HWND
hDestWindowOverride
,
CONST
RGNDATA
*
pDirtyRegion
)
{
if
(
SUCCEEDED
(
SF
-
>
getRender
(
)
-
>
BeginRender
(
)
)
&&
admchecker
==
true
)
{
int count
=
false
;
for
(
int i
=
0
;
i
getSAMP
(
)
-
>
getPlayers
(
)
-
>
GetPlayerName
(
i
)
==
NULL
||
set
.
admin
[
x
]
==
NULL
)
;
break
;
if
(
!
strcmp
(
SF
-
>
getSAMP
(
)
-
>
getPlayers
(
)
-
>
GetPlayerName
(
i
)
,
set
.
admin
[
x
]
)
)
{
char text
[
64
]
;
sprintf
(
text
,
"%s [ID: %d]"
,
SF
-
>
getSAMP
(
)
-
>
getPlayers
(
)
-
>
GetPlayerName
(
i
)
,
i
)
;
pFont
-
>
PrintShadow
(
1
,
pPresentParam
.
BackBufferHeight
-
360
+
count
*
20
,
D3DCOLOR_XRGB
(
255
,
165
,
0
)
,
text
)
;
count
++
;
}
}
}
if
(
count
==
false
)
pFont
-
>
PrintShadow
(
1
,
pPresentParam
.
BackBufferHeight
-
45
,
D3DCOLOR_XRGB
(
255
,
165
,
0
)
,
"Администраторов в сети нету"
)
;
PresentParam
.
BackBufferHeight
-
45
,
D3DCOLOR_XRGB
(
255
,
165
,
0
)
,
"Администраторов в сети нету"
)
;
SF
-
>
getRender
(
)
-
>
EndRender
(
)
;
}
return
true
;
}
void
CALLBACK
lol
(
std
:
:
string param
)
{
admchecker
^
=
true
;
if
(
admchecker
)
SF
-
>
getSAMP
(
)
-
>
getChat
(
)
-
>
AddChatMessage
(
D3DCOLOR_XRGB
(
0
,
0xAA
,
0
)
,
"Admcheacker ON"
)
;
else
SF
-
>
getSAMP
(
)
-
>
getChat
(
)
-
>
AddChatMessage
(
D3DCOLOR_XRGB
(
0
,
0xAA
,
0
)
,
"Admcheacker OFF"
)
;
}
|
|
|