
04.02.2019, 11:03
|
|
Участник форума
Регистрация: 20.08.2017
Сообщений: 195
С нами:
4596143
Репутация:
68
|
|
Код:
Код:
#define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS 1
#include "imgui.h"
#include
#define DIRECTINPUT_VERSION 0x0800
#include
#include
#define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS 1
#include
#include
#include
#include
#include "SAMPFUNCS_API.h"
#include "game_api\game_api.h"
SAMPFUNCS *SF = new SAMPFUNCS();
SAMPFUNCS *SF = new SAMPFUNCS();
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, "Nickname - %s, Ping - %d, Score - %d, isNPC - %d, AFKState - %d",
pPlayer->szPlayerName,
pPlayer->iPing,
pPlayer->iScore,
pPlayer->iIsNPC,
pPlayer->pPlayerData->iAFKState == 2);
SF->getSAMP()->getChat()->AddChatMessage(-1, buf);
};
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), "SAMPFUNCS Plugin loaded.");
SF->getSAMP()->registerChatCommand("showinfo", 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;
}
Как пофиксить?
Imgur(https://imgur.com/a/vOrjMjA)
|
|
|

04.02.2019, 14:20
|
|
Познавший АНТИЧАТ
Регистрация: 21.05.2014
Сообщений: 1,417
С нами:
6304259
Репутация:
183
|
|
Сообщение от sanreal
Код:
Код:
#define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS 1
#include "imgui.h"
#include
#define DIRECTINPUT_VERSION 0x0800
#include
#include
#define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS 1
#include
#include
#include
#include
#include "SAMPFUNCS_API.h"
#include "game_api\game_api.h"
SAMPFUNCS *SF = new SAMPFUNCS();
SAMPFUNCS *SF = new SAMPFUNCS();
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, "Nickname - %s, Ping - %d, Score - %d, isNPC - %d, AFKState - %d",
pPlayer->szPlayerName,
pPlayer->iPing,
pPlayer->iScore,
pPlayer->iIsNPC,
pPlayer->pPlayerData->iAFKState == 2);
SF->getSAMP()->getChat()->AddChatMessage(-1, buf);
};
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), "SAMPFUNCS Plugin loaded.");
SF->getSAMP()->registerChatCommand("showinfo", 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;
}
Как пофиксить?
Imgur(https://imgur.com/a/vOrjMjA)
14 строку удали.
|
|
|

04.02.2019, 14:32
|
|
Участник форума
Регистрация: 20.08.2017
Сообщений: 195
С нами:
4596143
Репутация:
68
|
|
|
|
|

05.02.2019, 12:23
|
|
Участник форума
Регистрация: 07.03.2015
Сообщений: 233
С нами:
5887139
Репутация:
18
|
|
При использовании cmd? Параметр функции у тебя принимает целочисленные значения, а на скриншоте используешь строковые значения , оттого и крашит.
|
|
|

09.02.2019, 22:16
|
|
Участник форума
Регистрация: 28.02.2018
Сообщений: 247
С нами:
4319646
Репутация:
63
|
|
Cannot open include file: 'd3dx9.h'
Как это пофиксить? До переустановки студии всё было нормально. DirectX 9 установлен.
|
|
|

09.02.2019, 22:18
|
|
Постоянный
Регистрация: 28.02.2018
Сообщений: 307
С нами:
4319022
Репутация:
113
|
|
Сообщение от xISRAPILx
Cannot open include file: 'd3dx9.h'
Как это пофиксить? До переустановки студии всё было нормально. DirectX 9 установлен.
Directx sdk походу это тебе нужно
|
|
|

22.04.2019, 22:21
|
|
Участник форума
Регистрация: 19.01.2017
Сообщений: 130
С нами:
4901705
Репутация:
98
|
|
Сообщение от xISRAPILx
Cannot open include file: 'd3dx9.h'
Как это пофиксить? До переустановки студии всё было нормально. DirectX 9 установлен.
located in VC++ Directories

|
|
|

09.02.2019, 22:30
|
|
Постоянный
Регистрация: 02.06.2018
Сообщений: 342
С нами:
4183567
Репутация:
133
|
|
Сообщение от Mozze.cpp
Как ID в CVehicle преобразовать?
C++:
Код:
struct
vehicle_info
*
pVehicle
=
SF
->
getGame
(
)
->
vehicleInfoGet
(
ID
,
0
)
;
CVehicle
*
CVeh
=
GAME
->
GetPools
(
)
->
GetVehicle
(
(
DWORD
)
pVehicle
)
;
|
|
|

09.02.2019, 23:21
|
|
Участник форума
Регистрация: 10.07.2018
Сообщений: 143
С нами:
4128555
Репутация:
68
|
|
Существует ли способ повернуть колеса на определенный градус?
К примеру, если эмулировать нажатие кнопки - колеса поворачиваются градусов на 50, а мне нужно, допустим, на 10.
Как это сделать?
|
|
|

09.02.2019, 23:31
|
|
Участник форума
Регистрация: 28.02.2018
Сообщений: 247
С нами:
4319646
Репутация:
63
|
|
Вот шо за пиздец? Тупо голый проект запустить не могу.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cp pCommon.targets(639,9): error MSB4030: "DebugFull" is an invalid value for the "GenerateDebugInformation" parameter of the "Link" task. The "GenerateDebugInformation" parameter is of type "System.Boolean".
|
|
|
|
 |
|
|
Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
|
|
|
|