
30.09.2015, 06:31
|
|
Участник форума
Регистрация: 12.07.2013
Сообщений: 161
С нами:
6755146
Репутация:
78
|
|
Сообщение от KYRLYK
Вот кусок плагина. При нажатии на P должно открыться меню, но оно не открывается.
C++:
Код:
void
CALLBACK
mainloop
(
)
{
static
bool
init
=
false
;
if
(
!
init
)
{
if
(
GAME
==
nullptr
)
return
;
if
(
GAME
->
GetSystemState
(
)
!=
eSystemState
::
GS_PLAYING_GAME
)
return
;
if
(
!
SF
->
getSAMP
(
)
->
IsInitialized
(
)
)
return
;
SF
->
getSAMP
(
)
->
registerChatCommand
(
"uinfo"
,
cmd_show_info_player
)
;
SF
->
getSAMP
(
)
->
registerChatCommand
(
"utp"
,
utp
)
;
SF
->
getSAMP
(
)
->
getChat
(
)
->
AddChatMessage
(
0xFF3300FF
,
"запущен!"
)
;
SF
->
LogConsole
(
" Loaded!"
)
;
twBar_Main
=
TwNewBar
(
"SF"
)
;
TwDefine
(
"'SF Ultimate' color='0 224 160' size='250 400' text=white position='5 400' position='200 200'"
)
;
TwAddButton
(
twBar_Main
,
"Player"
,
player
,
NULL
,
""
)
;
TwAddButton
(
twBar_Main
,
"Vehicles"
,
veh
,
NULL
,
""
)
;
TwAddButton
(
twBar_Main
,
"Nops"
,
nops
,
NULL
,
""
)
;
TwAddButton
(
twBar_Main
,
"Other"
,
other
,
NULL
,
""
)
;
TwAddButton
(
twBar_Main
,
"Help"
,
uhelp
,
NULL
,
""
)
;
bar
=
TwNewBar
(
"S"
)
;
TwAddButton
(
bar
,
"Info 1.1"
,
NULL
,
NULL
,
" label='/uinfo - player info' "
)
;
TwAddButton
(
bar
,
"Info 1.2"
,
NULL
,
NULL
,
" label='/' "
)
;
TwAddButton
(
bar
,
"Info 1.3"
,
NULL
,
NULL
,
" label='SF' "
)
;
init
=
true
;
}
if
(
SF
->
getGame
(
)
->
isKeyPressed
(
'P'
)
)
{
Active
^=
true
;
}
}
|
|
|