#include <windows.h>
#include <string>
#include <assert.h>
#include <process.h>
#include "SAMPFUNCS_API.h"
#include "game_api\game_api.h"
SAMPFUNCS *SF = new SAMPFUNCS();
float coords()
{
float fPos[3] = { PEDSELF->GetPosition()->fX,
PEDSELF->GetPosition()->fY,
PEDSELF->GetPosition()->fZ };
return (fPos[0], fPos[1], fPos[2]);
}
void script(void)
float fPos[3];
do
{
coords;
SF->getSAMP()->getChat()->AddChatMessage(-1, "Следующее действие");
} while (true);
void CALLBACK fld(std::string str)
{
script();
}
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("fld", fld);
init = true;
}
}