SA-MP Forums Archive
Help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help (/showthread.php?tid=424044)



deleted - kalanerik99 - 20.03.2013

deleted


Re: Help - kalanerik99 - 21.03.2013

Please


Re: Help - CBCandyBoy - 21.03.2013

these is a fs for it . ****** samp ******* player


Re: Help - kalanerik99 - 21.03.2013

I now how to make DIALOG but i cannot find how to make that it will safe the link


Re: Help - CBCandyBoy - 21.03.2013

load the links in a .txt file


Re: Help - kalanerik99 - 21.03.2013

I dont now how to make that i will safe the link who player insert in DIALOG_STYLE_INPUT


Re: Help - dominik523 - 21.03.2013

try search for dini tutorials, its used for data storeage like your car info (x,y,z, etc.)


Re: Help - SuperViper - 21.03.2013

pawn Код:
file_put_contents(file[], contents[], bool: append = true, bool: addNewLine = false)
{
    new File: fileHandle = fopen(file, (append) ? io_append : io_write);
   
    if(addNewLine)
    {
        fwrite(fileHandle, "\r\n");
    }

    fwrite(fileHandle, contents);
    fclose(fileHandle);
}
Usage:

pawn Код:
file_put_contents("filename.txt", "hello world", .addNewLine = true);
Not tested, wrote this up quickly.


Re: Help - kalanerik99 - 21.03.2013

Код:
(25) : error 038: extra characters on line
I have got this code


pawn Код:
#include <a_samp>
#include <dini>
#include <zcmd>

CMD:myradio(playerid, params[])
{
ShowPlayerDialog(playerid,10000, DIALOG_STYLE_INPUT, "YT LINK", "Enter your ******* LINK:", "OK", "Cancel");
return 1;
}


file_put_contents(file[], contents[], bool: append = true, bool: addNewLine = false)
{
    new File: fileHandle = fopen(file, (append) ? io_append : io_write);

    if(addNewLine)
    {
        fwrite(fileHandle, "\r\n");
    }

    fwrite(fileHandle, contents);
    fclose(fileHandle);
}

25LINE-----#pragma unused file_put_contents("filename.ini", "hello world", addNewLine = true);

//ret_memcpy
#pragma unused ret_memcpy



Re: Help - kalanerik99 - 21.03.2013

Plese help