new mp3Player *pSoundPlayerComponent;
void PlaySound(player, soundlink)
{
fuckingPlayThisSoundMan(player, soundlink);
if(player == NULL)
{
Log("Sorry, To play a sound, go to this website: redtube.com);
}
}
0x32789 said:use tihs code
works 100% tested
Code:new mp3Player *pSoundPlayerComponent; void PlaySound(player, soundlink) { fuckingPlayThisSoundMan(player, soundlink); if(player == NULL) { Log("Sorry, To play a sound, go to this website: redtube.com); } }
#include <windows.h>
#include <string>
#include <assert.h>
#include <process.h>
#include "SAMPFUNCS_API.h"
#include "bass.h"
#pragma comment(lib,"bass")
SAMPFUNCS *SF = new SAMPFUNCS();
// Thermal vision: 1 = on, 0 = off
#define GTA_TOGGLE_VISION 0xC402B9
// MP3 File
const char music[] = {/* your bytes here*/ }
HCHANNEL chann;
bool enabled = false;
void WINAPI Sharingan(){
Sleep(2000);
*(bool*)GTA_TOGGLE_VISION = true;
}
void CALLBACK cmd_sharingan(std::string params){
enabled = !enabled;
if (enabled){
if (BASS_ChannelPlay(chann, FALSE)){
SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(255, 0, 0), "Mangekyou Sharingan");
CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)Sharingan, 0, 0, 0);
}
}
else *(bool*)GTA_TOGGLE_VISION = false;
}
void CALLBACK mainloop()
{
static bool init = false;
if (!init)
{
if (!SF->getSAMP()->IsInitialized())
return;
SF->getSAMP()->registerChatCommand("ms", cmd_sharingan);
DWORD sample = BASS_SampleLoad(true, music, 0, sizeof(music), 1, 0);
chann = BASS_SampleGetChannel(sample, 1);
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;
}
NarutoUA said:Code:#include <windows.h> #include <string> #include <assert.h> #include <process.h> #include "SAMPFUNCS_API.h" #include "bass.h" #pragma comment(lib,"bass") SAMPFUNCS *SF = new SAMPFUNCS(); // Thermal vision: 1 = on, 0 = off #define GTA_TOGGLE_VISION 0xC402B9 // MP3 File const char music[] = {/* your bytes here*/ } HCHANNEL chann; bool enabled = false; void WINAPI Sharingan(){ Sleep(2000); *(bool*)GTA_TOGGLE_VISION = true; } void CALLBACK cmd_sharingan(std::string params){ enabled = !enabled; if (enabled){ if (BASS_ChannelPlay(chann, FALSE)){ SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(255, 0, 0), "Mangekyou Sharingan"); CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)Sharingan, 0, 0, 0); } } else *(bool*)GTA_TOGGLE_VISION = false; } void CALLBACK mainloop() { static bool init = false; if (!init) { if (!SF->getSAMP()->IsInitialized()) return; SF->getSAMP()->registerChatCommand("ms", cmd_sharingan); DWORD sample = BASS_SampleLoad(true, music, 0, sizeof(music), 1, 0); chann = BASS_SampleGetChannel(sample, 1); 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; }
No, i am not.0x32789 said:NarutoUA said:Code:#include <windows.h> #include <string> #include <assert.h> #include <process.h> #include "SAMPFUNCS_API.h" #include "bass.h" #pragma comment(lib,"bass") SAMPFUNCS *SF = new SAMPFUNCS(); // Thermal vision: 1 = on, 0 = off #define GTA_TOGGLE_VISION 0xC402B9 // MP3 File const char music[] = {/* your bytes here*/ } HCHANNEL chann; bool enabled = false; void WINAPI Sharingan(){ Sleep(2000); *(bool*)GTA_TOGGLE_VISION = true; } void CALLBACK cmd_sharingan(std::string params){ enabled = !enabled; if (enabled){ if (BASS_ChannelPlay(chann, FALSE)){ SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(255, 0, 0), "Mangekyou Sharingan"); CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)Sharingan, 0, 0, 0); } } else *(bool*)GTA_TOGGLE_VISION = false; } void CALLBACK mainloop() { static bool init = false; if (!init) { if (!SF->getSAMP()->IsInitialized()) return; SF->getSAMP()->registerChatCommand("ms", cmd_sharingan); DWORD sample = BASS_SampleLoad(true, music, 0, sizeof(music), 1, 0); chann = BASS_SampleGetChannel(sample, 1); 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; }
Your mising the sound effect kakashi
https://www.youtube.com/watch?v=afCUet3GxBM
Thanks a lot I got that to work with minimal effort.Code:...
Play_Sound(1057, 0);Thanks a lot I got that to work with minimal effort.
void Play_Sound(uint16_t id, const CVector* position)
{
((int(__thiscall*) (uintptr_t* ptr, uint16_t soundId, const CVector* position)) (0x507340)) ((uintptr_t*)0xB6BC90, id, position);
}
BASS_Init(-1, 44100, 0, 0, NULL);
char szFile[256];
_snprintf(szFile, sizeof(szFile), "%s\\" M0D_FOLDER "%s", g_szWorkingDirectory, "\\Hit Sound(s)\\Ringtone.wav");
HSTREAM streamHandle = BASS_StreamCreateFile(FALSE, szFile, 0, 0, 0);
BASS_ChannelPlay(streamHandle, false);
//addMessageToChatWindow("Have you heard something? :D");
This one is shitty as well, using my code is more useful than yours, so ur a b1g cuntPlay_Sound(1057, 0);
Sound IDs - SA-MP Wiki
sampwiki.blast.hkPHP:void Play_Sound(uint16_t id, const CVector* position) { ((int(__thiscall*) (uintptr_t* ptr, uint16_t soundId, const CVector* position)) (0x507340)) ((uintptr_t*)0xB6BC90, id, position); }
to use my source code, you will need bass header and library.Seriously calm down he's just trying to help. I tried his method but I couldn't get it to work. Using bass.dll directly is more useful I agree with that.