Переменные

kotec

Участник
Автор темы
40
0
Суть думаю проста, как сделать, чтобы то, что вписал игрок в команде сохранялось в переменную?

PHP:
$~NumpadEnter::
$~Enter::
if (isInChat() and !isDialogOpen())
{
   sleep 200
   chatInput := readString(hGTA, dwSAMP + 0x12D8F8, 256)
   if (chatInput == "/new")
   {
        writeString(hGTA, dwAddress, 256)
        addChatMessage("Новый сотрудник - " *тут будет ник, который игрок ввёл в команде* "")
        Sleep, 1500
   }
}
return
 

Cucumber

Участник
40
21
C++:
~*Enter::
BlockChatInput()
if (isInChat() && !isDialogOpen())
{
    sleep 300
    dwAddress := dwSAMP + 0x12D8F8
    chatInput := readString(hGTA, dwAddress, 256)
    unBlockChatInput()
    if(RegExMatch(chatInput, "^\/new (\d+)", agent))
    {
        addChatMessage("Новый сотрудник - " getplayernamebyid(agent1) "")
        Sleep, 1500
    }
    else
    {
        unBlockChatInput()
        if(chatInput != "")
        {
            SendChat(chatInput)
            dwAddress := dwSAMP + 0x12D8F8
            writeString(hGTA, dwAddress, "")
        }
    }
}
return
 
  • Нравится
Реакции: kotec