ANTICHAT

ANTICHAT (https://forum.antichat.xyz/index.php)
-   Общие вопросы программирования (https://forum.antichat.xyz/forumdisplay.php?f=206)
-   -   How to make a command for sobeit? (https://forum.antichat.xyz/showthread.php?t=1467483)

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

xoris82 10.02.2023 11:50

thanks !


Время: 14:49