Другое С/С++ Вопрос - Ответ

5ss

Новичок
10
0
как вызывать диалоги? хочу попробывать сделать фейк диалог в соб
 

Woofing Giraffe

Активный
402
49
Код:
    char stroka1[128];
    DWORD wCount;
    HANDLE hFile = CreateFile(cf, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
    ReadFile(hFile, stroka1, strlen(stroka1), &wCount, NULL);
    CloseHandle(hFile);
Что я делаю не так? В файле одна строка: X = 122.00000, а возвращает X = 122.00000). И ещё, как потом полученный результат перевести в float без потери данных?
 

Goldfish

Известный
106
22
подскажите плиз де взять все файлы заголовок, а то чет не хватает походу =/
 

sotoreal

Новичок
14
0
Помогите как сдвинуть в левый угол надписи (Inv, Airbrk, fly и т.д) не могу найти код который за это отвечает и какие параметры надо изменять.
 

Username

Потрачен
6
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Возможно ли эмулировать входящий пакет/rpc в собейте? Если да, то как? Спасибо
 

Woofing Giraffe

Активный
402
49
Есть вопрос не по SF API а в C++ в челом... Можно как-нибудь скомпилировать скрипт в своей программе? Допустим сделал я прогу в которой мне надо скомпилировать С++ скрипт... ПО идее это можно сделать, но как?
Всё равно должен использоваться компилятор VS или подобный. Сделать самому думаю будет сложно
 

White_116

Новичок
18
6
Препроцессор и компилятор тоже свой писать собрался?

//----

Есть у кого адрес, чтобы вернуть тени игроку?
 

Dark_Knight

Me, me and me.
Друг
4,080
2,112
Ты вообще просто кнопки добавляешь. АТБ еще рисовать надо в коллбеки рендера.
 

san0

Известный
Друг
412
275
C++:
#define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS
#include <windows.h>
#include <string>
#include <assert.h>
#include <process.h>
#include "SAMPFUNCS_API.h"
#include "game_api\game_api.h"
#include "AntTweakbar.h"
#pragma comment (lib, "AntTweakBar.lib")

SAMPFUNCS *SF = new SAMPFUNCS();



void TW_CALL uclear(void *clientData)
{
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
    SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "");
}

void TW_CALL uhelp(void *clientData)
{
    if (!SF->getSAMP()->IsInitialized())
        return;
    TwBar *bar = nullptr;
    bar = TwNewBar("SF Ultimate HELP");
    TwAddButton(bar, "Info1.1", NULL, NULL, " label='/uinfo <id> - player info' ");
    TwAddButton(bar, "Info1.2", NULL, NULL, " label='/utp <id> - player teleport' ");
    TwAddButton(bar, "Info1.3", NULL, NULL, " label='SF Ultimate by KYRLYK' ");
}


void __stdcall utp(std::string param)
{
    if (param.empty()) return;
    int i = std::stoi(param);
    char buf[128];
    actor_info *acter = SF->getGame()->actorInfoGet(-1, 0x01);
    acter->base.matrix[4 * 3] = SF->getSAMP()->getPlayers()->pRemotePlayer[i]->pPlayerData->fOnFootPos[0];
    acter->base.matrix[4 * 3 + 1] = SF->getSAMP()->getPlayers()->pRemotePlayer[i]->pPlayerData->fOnFootPos[1];
    acter->base.matrix[4 * 3 + 2] = SF->getSAMP()->getPlayers()->pRemotePlayer[i]->pPlayerData->fOnFootPos[2];
    sprintf(buf, "[uTP] Вы телепортированы к игроку. ID: %d", i);
    SF->getSAMP()->getChat()->AddChatMessage(-1, buf);
}

void TW_CALL fullhp(void *clientData)
{
    PEDSELF->SetHealth(100);
}

void TW_CALL armor(void *clientData)
{
    PEDSELF->SetArmor(100);
}


void TW_CALL utime(void *clientData)
{
        char buf[128];
         SYSTEMTIME lt, st;
        GetLocalTime(&lt);
        GetSystemTime(&st);
        sprintf(buf, "[uTime] Время: %02d:%02d:%02d", lt.wHour, lt.wMinute, lt.wSecond);
        SF->getSAMP()->getChat()->AddChatMessage(-1, buf);
    }


void TW_CALL dialog_hide(void *clientData)
{
    int &iDialogStatus = SF->getSAMP()->getDialog()->iIsActive;

    iDialogStatus ^= true;

    if (!iDialogStatus)
        SF->getSAMP()->getMisc()->ToggleCursor(false);
}

void CALLBACK cmd_show_info_player(std::string param)
{
    if (param.empty()) return;
    int    i = std::stoi(param);

    char buf[128];

    stRemotePlayer *pPlayer = SF->getSAMP()->getPlayers()->pRemotePlayer[i];

    if (!pPlayer) return;

    sprintf(buf, "Ник - %s, Пинг - %d, LVL - %d, AFK - %d",
        pPlayer->szPlayerName,
        pPlayer->iPing,
        pPlayer->iScore,
        pPlayer->pPlayerData->iAFKState == 2);

    SF->getSAMP()->getChat()->AddChatMessage(-1, buf);
};

static void TW_CALL nofallon(const void *value, void *clientData)
{
    SF->getCLEO()->callOpcode("08C6: set_actor $PLAYER_ACTOR stay_on_bike 1");
}
static void TW_CALL nofalloff(void *value, void *clientData)
{
    SF->getCLEO()->callOpcode("08C6: set_actor $PLAYER_ACTOR stay_on_bike 0");
}



void TW_CALL player(void *clientData)
{
    TwBar *player = nullptr;
    player = TwNewBar("SF Ultimate PLAYER");
    TwAddButton(player, "100 HP", fullhp, NULL, "");
    TwAddButton(player, "100 AP", armor, NULL, "");
    TwAddVarCB(player, "BikeNoFall", TW_TYPE_BOOLCPP, nofallon, nofalloff, "", NULL);
}

void TW_CALL veh(void *clientData)
{
    if (!SF->getSAMP()->IsInitialized())
        return;
    TwBar *veh = nullptr;
    veh = TwNewBar("SF Ultimate VEHICLES");
}

void TW_CALL respawn(void *clientData)
{
    SF->getSAMP()->getPlayers()->pLocalPlayer->Spawn();
}

void TW_CALL other(void *clientData)
{
    if (!SF->getSAMP()->IsInitialized())
        return;
    TwBar *other = nullptr;
    other = TwNewBar("SF Ultimate OTHER");
    TwAddButton(other, "Time", utime, NULL, "");
    TwAddButton(other, "DialogHider", dialog_hide, NULL, "");
    TwAddButton(other, "ClearChat", uclear, NULL, "");
    TwAddButton(other, "Respawn", respawn, NULL, "");
}

void TW_CALL nopsp(void *clientData)
{
    SF->getCLEO()->callOpcode("0B2E: 1@ = read_samp_memory offset 0x15970 size 2\"");
    SF->getCLEO()->callOpcode("0B2D: write_samp_memory offset 0x15970 value 1@ size 2\"");
}

void TW_CALL nops(void *clientData)
{
    if (!SF->getSAMP()->IsInitialized())
        return;
    TwBar *other = nullptr;
    other = TwNewBar("SF Ultimate NOPS");
    TwAddButton(other, "NotWork", nopsp, NULL, "");
}

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( D3DCOLOR_XRGB( 0, 0x3300FF, 0 ), "[KYRLYK] SF Ultimate BETA запущен!" );
        SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0x3300FF, 0), "[KYRLYK]");
        SF->LogConsole("SF Ultimate by KYRLYK Loaded!");
        if (SF->getGame()->isKeyPressed('P'))
        {
            TwBar *twBar_Main = nullptr;
            twBar_Main = TwNewBar("SF Ultimate");
            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, "");
        }
        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;
}
Очистка чата от души
 
  • Нравится
Реакции: Slono_Boyko и Sire Like