- 36
- 0
- Версия SA-MP
-
- 0.3.7-R3
- Любая
- Другая
Можете проверить скрипт, чтобы при нажатии клавиши F2 выдавался джетпак
/* Replace "dll.h" with the name of your header */
#include "dll.h"
#include <windows.h>
DllClass::DllClass()
{
}
DllClass::~DllClass()
{
}
void OnTimer(HWND hwnd, UINT msg, UINT idTimer, DWORD dwTime)
{
if(GetAsyncKeyState(0x71) & 0x8000)
{
void gta_jetpack_give ( void )
{
jetpack_give_func jetpack_give = ( jetpack_give_func ) 0x00439600;
Log( "Calling jetpack_give()..." );
jetpack_give();
Log( "Returned." );
}
}
}
BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
{
switch(fdwReason)
{
case DLL_PROCESS_ATTACH:
{
SetTimer(0, 0, 400, (TIMERPROC)OnTimer);
break;
/* Return TRUE on success, FALSE on failure */
return TRUE;
}
/* Replace "dll.h" with the name of your header */
#include "dll.h"
#include <windows.h>
DllClass::DllClass()
{
}
DllClass::~DllClass()
{
}
void OnTimer(HWND hwnd, UINT msg, UINT idTimer, DWORD dwTime)
{
if(GetAsyncKeyState(0x71) & 0x8000)
{
void gta_jetpack_give ( void )
{
jetpack_give_func jetpack_give = ( jetpack_give_func ) 0x00439600;
Log( "Calling jetpack_give()..." );
jetpack_give();
Log( "Returned." );
}
}
}
BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
{
switch(fdwReason)
{
case DLL_PROCESS_ATTACH:
{
SetTimer(0, 0, 400, (TIMERPROC)OnTimer);
break;
/* Return TRUE on success, FALSE on failure */
return TRUE;
}