Нашёл уже ошибку и исправил. Большое спасибо за исправление с директориейа если у меня диск не так называется? Используй GetWindowsDirectory + \\Fonts\\arialbd.ttf
покажи деструктор
Нашёл уже ошибку и исправил. Большое спасибо за исправление с директориейа если у меня диск не так называется? Используй GetWindowsDirectory + \\Fonts\\arialbd.ttf
покажи деструктор
function Search3Dtext(x, y, z, radius, patern)
local text = ""
local color = 0
local posX = 0.0
local posY = 0.0
local posZ = 0.0
local distance = 0.0
local ignoreWalls = false
local player = -1
local vehicle = -1
local result = false
for id = 0, 2048 do
if sampIs3dTextDefined(id) then
local text2, color2, posX2, posY2, posZ2, distance2, ignoreWalls2, player2, vehicle2 = sampGet3dTextInfoById(id)
if getDistanceBetweenCoords3d(x, y, z, posX2, posY2, posZ2) < radius then
if string.len(patern) ~= 0 then
if string.match(text2, patern, 0) ~= nil then result = true end
else
result = true
end
if result then
text = text2
color = color2
posX = posX2
posY = posY2
posZ = posZ2
distance = distance2
ignoreWalls = ignoreWalls2
player = player2
vehicle = vehicle2
radius = getDistanceBetweenCoords3d(x, y, z, posX, posY, posZ)
end
end
end
end
return result, text, color, posX, posY, posZ, distance, ignoreWalls, player, vehicle
end
for (int i = 0; i < SAMP_MAX_3DTEXTS; i++)
{
char stroka[256];
if (SF->getSAMP()->getInfo()->pPools->pText3D->iIsListed[i] != 1)
continue;
if (SF->getSAMP()->getInfo()->pPools->pText3D->textLabel[i].fPosition[0] == NULL ||
SF->getSAMP()->getInfo()->pPools->pText3D->textLabel[i].fPosition[1] == NULL ||
SF->getSAMP()->getInfo()->pPools->pText3D->textLabel[i].fPosition[2] == NULL) {
continue;
}
stroka = SF->getSAMP()->getInfo()->pPools->pText3D->textLabel[i].pText;
}
На сф есть у кого-то?Lua:function Search3Dtext(x, y, z, radius, patern) local text = "" local color = 0 local posX = 0.0 local posY = 0.0 local posZ = 0.0 local distance = 0.0 local ignoreWalls = false local player = -1 local vehicle = -1 local result = false for id = 0, 2048 do if sampIs3dTextDefined(id) then local text2, color2, posX2, posY2, posZ2, distance2, ignoreWalls2, player2, vehicle2 = sampGet3dTextInfoById(id) if getDistanceBetweenCoords3d(x, y, z, posX2, posY2, posZ2) < radius then if string.len(patern) ~= 0 then if string.match(text2, patern, 0) ~= nil then result = true end else result = true end if result then text = text2 color = color2 posX = posX2 posY = posY2 posZ = posZ2 distance = distance2 ignoreWalls = ignoreWalls2 player = player2 vehicle = vehicle2 radius = getDistanceBetweenCoords3d(x, y, z, posX, posY, posZ) end end end end return result, text, color, posX, posY, posZ, distance, ignoreWalls, player, vehicle end
Что не так?
C++:for (int i = 0; i < SAMP_MAX_3DTEXTS; i++) { char stroka[256]; if (SF->getSAMP()->getInfo()->pPools->pText3D->iIsListed[i] != 1) continue; if (SF->getSAMP()->getInfo()->pPools->pText3D->textLabel[i].fPosition[0] == NULL || SF->getSAMP()->getInfo()->pPools->pText3D->textLabel[i].fPosition[1] == NULL || SF->getSAMP()->getInfo()->pPools->pText3D->textLabel[i].fPosition[2] == NULL) { continue; } stroka = SF->getSAMP()->getInfo()->pPools->pText3D->textLabel[i].pText; }
for (int i = 0; i < SAMP_MAX_3DTEXTS; i++)
{
if (SF->getSAMP()->getInfo()->pPools->pText3D->iIsListed[i] != 1)
continue;
string texts = SF->getSAMP()->getInfo()->pPools->pText3D->textLabel[i].pText;
float x = SF->getSAMP()->getInfo()->pPools->pText3D->textLabel[i].fPosition[0];
float y = SF->getSAMP()->getInfo()->pPools->pText3D->textLabel[i].fPosition[1];
float z = SF->getSAMP()->getInfo()->pPools->pText3D->textLabel[i].fPosition[2];
}
https://docs.microsoft.com/ru-ru/wi...rapi/nf-libloaderapi-freelibraryandexitthreadКак сделать, чтобы плагин сам себя выгрузил типо pfree
в .sf никакКак сделать, чтобы плагин сам себя выгрузил типо pfree
Поворота камеры не достаточно. Ведь это транспорт, а не бегПоворачиваешь камеру на нужные тебе коорды и эмулируешь W, либо можешь воспользоваться собейтовской функцией.
BASS.lib ,https://blast.hk/threads/34405/Подскажите, как это будет в SF
C++:018C: play_sound 1082 at 0.0 0.0 0.0
Подскажите, как это будет в SF
C++:018C: play_sound 1082 at 0.0 0.0 0.0
void playsound(uint16_t id, const CVector* position)
{
((int(__thiscall*) (uintptr_t* ptr, uint16_t soundId, const CVector* position)) (0x507340)) ((uintptr_t*)0xB6BC90, id, position);
}
SF->getGame()->emulategtaKey ('H');как эмулировать клавишу H находясь в машине чтобы сработал onplayerkeystatechange?
Code by @Mozze.cppHow to get the name of the vehicle I enter in?
CHAR Vehicles[][212] = {
{ "Landstalker" },
{ "Bravura" },
{ "Buffalo" },
{ "Linerunner" },
{ "Perrenial" },
{ "Sentinel" },
{ "Dumper" },
{ "Firetruck" },
{ "Trashmaster" },
{ "Stretch" },
{ "Manana" },
{ "Infernus" },
{ "Voodoo" },
{ "Pony" },
{ "Mule" },
{ "Cheetah" },
{ "Ambulance" },
{ "Leviathan" },
{ "Moonbeam" },
{ "Esperanto" },
{ "Taxi" },
{ "Washington" },
{ "Bobcat" },
{ "MrWhoopee" },
{ "BFInjection" },
{ "Hunter" },
{ "Premier" },
{ "Enforcer" },
{ "Securicar" },
{ "Banshee" },
{ "Predator" },
{ "Bus" },
{ "Rhino" },
{ "Barracks" },
{ "Hotknife" },
{ "Trailer1" },
{ "Previon" },
{ "Coach" },
{ "Cabbie" },
{ "Stallion" },
{ "Rumpo" },
{ "RCBandit" },
{ "Romero" },
{ "Packer" },
{ "Monster" },
{ "Admiral" },
{ "Squalo" },
{ "Seasparrow" },
{ "Pizzaboy" },
{ "Tram" },
{ "Trailer2" },
{ "Turismo" },
{ "Speeder" },
{ "Reefer" },
{ "Tropic" },
{ "Flatbed" },
{ "Yankee" },
{ "Caddy" },
{ "Solair" },
{ "BerkleyRCVan" },
{ "Skimmer" },
{ "PCJ-600" },
{ "Faggio" },
{ "Freeway" },
{ "RCBaron" },
{ "RCRaider" },
{ "Glendale" },
{ "Oceanic" },
{ "Sanchez" },
{ "Sparrow" },
{ "Patriot" },
{ "Quad" },
{ "Coastguard" },
{ "Dinghy" },
{ "Hermes" },
{ "Sabre" },
{ "Rustler" },
{ "ZR-350" },
{ "Walton" },
{ "Regina" },
{ "Comet" },
{ "BMX" },
{ "Burrito" },
{ "Camper" },
{ "Marquis" },
{ "Baggage" },
{ "Dozer" },
{ "Maverick" },
{ "NewsChopper" },
{ "Rancher" },
{ "FBIRancher" },
{ "Virgo" },
{ "Greenwood" },
{ "Jetmax" },
{ "Hotring" },
{ "Sandking" },
{ "Blista Compact" },
{ "Police Maverick" },
{ "Boxville" },
{ "Benson" },
{ "Mesa" },
{ "RCGoblin" },
{ "HotringRacer A" },
{ "HotringRacer B" },
{ "BloodringBanger" },
{ "Rancher" },
{ "SuperGT" },
{ "Elegant" },
{ "Journey" },
{ "Bike" },
{ "MountainBike" },
{ "Beagle" },
{ "Cropdust" },
{ "Stunt" },
{ "Tanker" },
{ "Roadtrain" },
{ "Nebula" },
{ "Majestic" },
{ "Buccaneer" },
{ "Shamal" },
{ "Hydra" },
{ "FCR-900" },
{ "NRG-500" },
{ "HPV1000" },
{ "CementTruck" },
{ "TowTruck" },
{ "Fortune" },
{ "Cadrona" },
{ "FBITruck" },
{ "Willard" },
{ "Forklift" },
{ "Tractor" },
{ "Combine" },
{ "Feltzer" },
{ "Remington" },
{ "Slamvan" },
{ "Blade" },
{ "Freight" },
{ "Streak" },
{ "Vortex" },
{ "Vincent" },
{ "Bullet" },
{ "Clover" },
{ "Sadler" },
{ "FiretruckLA" },
{ "Hustler" },
{ "Intruder" },
{ "Primo" },
{ "Cargobob" },
{ "Tampa" },
{ "Sunrise" },
{ "Merit" },
{ "Utility" },
{ "Nevada" },
{ "Yosemite" },
{ "Windsor" },
{ "MonsterA" },
{ "MonsterB" },
{ "Uranus" },
{ "Jester" },
{ "Sultan" },
{ "Stratum" },
{ "Elegy" },
{ "Raindance" },
{ "RC Tiger" },
{ "Flash" },
{ "Tahoma" },
{ "Savanna" },
{ "Bandito" },
{ "FreightFlat" },
{ "StreakCarriage" },
{ "Kart" },
{ "Mower" },
{ "Duneride" },
{ "Sweeper" },
{ "Broadway" },
{ "Tornado" },
{ "AT-400" },
{ "DFT-30" },
{ "Huntley" },
{ "Stafford" },
{ "BF-400" },
{ "Newsvan" },
{ "Tug" },
{ "Trailer 3" },
{ "Emperor" },
{ "Wayfarer" },
{ "Euros" },
{ "Hotdog" },
{ "Club" },
{ "FreightCarriage" },
{ "Trailer3" },
{ "Andromada" },
{ "Dodo" },
{ "RCCam" },
{ "Launch" },
{ "PoliceCar(LSPD)" },
{ "PoliceCar(SFPD)" },
{ "PoliceCar(LVPD)" },
{ "PoliceRanger" },
{ "Picador" },
{ "S.W.A.T.Van" },
{ "Alpha" },
{ "Phoenix" },
{ "Glendale" },
{ "Sadler" },
{ "LuggageTrailerA" },
{ "LuggageTrailerB" },
{ "StairTrailer" },
{ "Boxville" },
{ "FarmPlow" },
{ "UtilityTrailer" }
};
CONST CHAR* GetVehicleName(INT ID = -1)
{
if (ID == -1)
{
if (SF->getSAMP()->getVehicles()->pSAMP_Vehicle[SF->getSAMP()->getPlayers()->pLocalPlayer->inCarData.sVehicleID] == NULL) return "";
if (SF->getSAMP()->getVehicles()->pSAMP_Vehicle[SF->getSAMP()->getPlayers()->pLocalPlayer->inCarData.sVehicleID]->pGTA_Vehicle == NULL) return "";
return Vehicles[SF->getSAMP()->getVehicles()->pSAMP_Vehicle[SF->getSAMP()->getPlayers()->pLocalPlayer->inCarData.sVehicleID]->pGTA_Vehicle->base.model_alt_id - 400];
}
else
{
if (SF->getSAMP()->getVehicles()->pSAMP_Vehicle[ID] == NULL) return "";
if (SF->getSAMP()->getVehicles()->pSAMP_Vehicle[ID]->pGTA_Vehicle == NULL) return "";
return Weapons[SF->getSAMP()->getPlayers()->pRemotePlayer[ID]->pPlayerData->onFootData.byteCurrentWeapon];
}
}
You need hook Outcoming RPC:How to parse the text (and add things) before sending it via T > {enter}?