
07.03.2016, 15:59
|
|
Участник форума
Регистрация: 09.03.2015
Сообщений: 218
С нами:
5884065
Репутация:
0
|
|
Сообщение от legend2360
Бли, хватит флудить здесь этим вопросом.
В крайнем случае можешь применить класс SFCleo.
А wait можно?
Сообщение от legend2360
Бли, хватит флудить здесь этим вопросом.
В крайнем случае можешь применить класс SFCleo.
Все равно
PHP:
Код:
#include
#include
#include
#include
#include "SAMPFUNCS_API.h"
#include "game_api\game_api.h"
SAMPFUNCS
*
SF
=
new
SAMPFUNCS
(
)
;
bool kek
=
false
;
void
CALLBACK
cmd_show_info_player
(
std
:
:
string param
)
{
kek
^
=
true
;
if
(
kek
)
{
if
(
SF
-
>
getCLEO
(
)
-
>
callOpcode
(
"02E0: actor $PLAYER_ACTOR firing_weapon"
)
&&
SF
-
>
getSAMP
(
)
-
>
getPlayers
(
)
-
>
pLocalPlayer
-
>
byteCurrentWeapon
==
25
)
{
SF
-
>
getCLEO
(
)
-
>
callOpcode
(
"0001: wait 50"
)
;
PEDSELF
-
>
GiveWeapon
(
(
eWeaponType
)
25
,
0
,
WEAPONSKILL_PRO
)
;
}
}
}
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
(
)
-
>
getChat
(
)
-
>
AddChatMessage
(
D3DCOLOR_XRGB
(
0
,
0xAA
,
0
)
,
"macro"
)
;
SF
-
>
getSAMP
(
)
-
>
registerChatCommand
(
"cyka"
,
cmd_show_info_player
)
;
init
=
true
;
}
}
BOOL
APIENTRY
DllMain
(
HMODULE
hModule
,
DWORD
dwReasonForCall
,
LPVOID
lpReserved
)
{
switch
(
dwReasonForCall
)
{
case
DLL_PROCESS_ATTACH
:
SF
-
>
initPlugin
(
mainloop
,
hModule
)
;
break
;
case
DLL_THREAD_ATTACH
:
case
DLL_THREAD_DETACH
:
case
DLL_PROCESS_DETACH
:
break
;
}
return
TRUE
;
}
|
|
|