T3K link said:Ok then you maybe can do it this way, BUT i'm not 100% sure...
Code:void showSampDialog (int send, int dialogID, int typedialog, char * caption, const char * text, char * button1, char * button2) { uint32_t func = pSAMP + SAMP_DIALOG_SHOW; uint32_t data = pSAMP + SAMP_DIALOG_INFO_OFFSET; __asm mov eax, dword ptr [data] __asm mov ecx, dword ptr [eax] //mov to offset __asm push send //0 - No send response, 1 - Send response __asm push button2 __asm push button1 __asm push text __asm push caption __asm push typedialog __asm push dialogID __asm call func } /// std::string List = "12345678"; showSampDialog(0, 0 ,2,"LIST",List.c_str(),"OK","CLOSE");
since c_str() is return a const char* and the parameter needs to be a const char* you won't have problems with the function, unless if the function overwrites the str (list.c_str()) in that case it won't work... but i think it will since it doesn't have any reason to edit it... just try it
Thanks T3K, I tried your suggestion and it still froze the game before the dialog was shown around 30% of the time. I'll try whatever other changes i can think of to get this working. without freezing