Первым я перенёс скрипт для езды по стенам.
Управление:
Включить/выключить - клавиша "Э"
Подпрыгнуть - клавиша "Ж"
Ускориться - клавиша Shift
Этот скрипт поддерживает GTAIV 1.0.7.0 и EFLC 1.1.2.0.
Установка:
Просто скопируйте содержимое архива в папку игры. (XLiveLess (рекомендуется) или ASILoader должен быть установлен)
Скриншоты:
Вот кусок исходника:
#include "CustomFiberThread.h" #include "../Sticky/Scripting.h" #include "../ScriptHook/Log.h" #include <windows.h> // Pull in all our scripting functions/types using namespace Scripting; CustomFiberThread::CustomFiberThread() { // Give your own name here! SetName("Sticky"); } // Some helper functions /*...*/ bool CustomFiberThread::KeyPressed(int key) { return (GetKeyState(key) & 0x80000000) != 0; } // The real script void CustomFiberThread::RunScript() { // This is a fiber thread, so we use an loop to run the contents of this script. // The thread will terminate when we return from this function. int PlayerId; Scripting::Ped PlayerChar; Scripting::Vehicle PlayerCar; unsigned int SCurTime, SLastTime; float UpperForce=0.65f; bool on=false; SLastTime=0; while(IsThreadAlive()) { PlayerId = GetPlayerId(); if (PlayerId >= 0) if (IsPlayerPlaying(PlayerId)) if (PlayerHasChar(PlayerId)) { GetPlayerChar(PlayerId, &PlayerChar); if (*((int*)(&PlayerChar))>0) { if (IsCharInAnyCar(PlayerChar)) { StoreCarCharIsInNoSave(PlayerChar, &PlayerCar); while (IsThreadAlive() && IsPlayerPlaying(PlayerId) && IsCharInCar(PlayerChar, PlayerCar)) { if (on) { GetGameTimer(&SCurTime); if (!IsCarInAirProper(PlayerCar)) { GetGameTimer(&SLastTime); } if (KeyPressed(VK_OEM_1) && (SCurTime-SLastTime<400)) { ApplyForceToCar(PlayerCar,1,0.0,0.0,1.0,0.0,2.0,0.0,1,1,1,1); //Wait(90); //ApplyForceToCar(PlayerCar,1,0.0,0.0,1.0,0.0,1.0,0.0,1,1,1,1); } if (KeyPressed(VK_SHIFT) && (SCurTime-SLastTime<400)) { if (KeyPressed('S')) ApplyForceToCar(PlayerCar,1,0.0,-1.0,0.0,0.0,0.0,0.0,1,1,1,1); else ApplyForceToCar(PlayerCar,1,0.0,1.0,0.0,0.0,0.0,0.0,1,1,1,1); //Wait(90); //ApplyForceToCar(PlayerCar,1,0.0,0.0,1.0,0.0,1.0,0.0,1,1,1,1); } //ShowText(IntToStr(SCurTime-SLastTime),100); if (SCurTime-SLastTime<500) { ApplyForceToCar(PlayerCar,1,0.0,0.0,UpperForce,0.0,0.0,0.0,1,0,1,1); ApplyForceToCar(PlayerCar,1,0.0,0.0,-UpperForce,0.0,0.0,0.0,1,1,1,1); } } if (KeyPressed(VK_OEM_7)) { on=!on; if (on) PrintStringWithLiteralStringNow("string", "Sticky activated", 1500, 1); else PrintStringWithLiteralStringNow("string", "Sticky deactivated", 1500, 1); while (IsThreadAlive() && KeyPressed(VK_OEM_7)) Wait(100); } Wait(25); } if (on) PrintStringWithLiteralStringNow("string", "Sticky deactivated", 1500, 1); on=false; } } } // Call Wait() so we can process other scripts/game code // You must call Wait(...) in your loop code for a fiber thread! Wait(100); } }(Весь исходник можно скачать здесь: SourceSticky.rar 300.42К 7 загрузок)
Скрипт находится в аттаче:
Sticky.rar 147.82К 5 загрузок