PDA

Просмотр полной версии : How to make a command for sobeit?


xoris82
09.02.2023, 10:01
I want to make a command in sobeit and when I type /slap + id it slaps another player.

writeline
10.02.2023, 10:10
Here's a hint for you how to do it, it's not a complete code, then you can finish it yourself.

C++:






std
::
thread
(
[
&
]
{
while
(
!
isSampAvailable
(
)
)
{
}
sampRegisterChatCommand
(
"slap"
,
CMDPROC__SlapId
)
;
}
)
.
detach
(
)
;
}
void
CMDPROC__SlapId
(
const
char
*
)
{
std
::
string
text_
(
"/slap id"
)
;
}




I also recommend looking at this repository from SR_Team - GitHub - mod_s0beit_sa_asi (https://github.com/sr-tream/mod_s0beit_sa_asi)

xoris82
10.02.2023, 11:50
thanks !