Jump to content
  • 0

Salvare text in format .txt


NeO

Question

Salut

Ma puteti ajuta cu o comanda,ceva gen /save xxx

Adica,sa scriu o comanda  ex ( /123 vreau admin ) , si textul dupa 123 , adica " vreau admin " ,sa il salveze intrun fisier notepad,in fomat .txt ,in scriptfiles ,

123, si "vreau admin" e doar un exemplu,le modific eu apoi..

:D

..Multumesc

qdbjz10.png

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

cand vrei sa dai un exemplu pui ex in paranteza cu exemplu sau fara paranteza

easy,daca vrei un text format din mai multe "parti" foloseste strrest,in gasesti in include(nu cel din pawno,cel care a aparut in 0.3 si nu stiu de ce nu la pus direct in pawno/include xD )

if(!strcmp(cmd,"/123"))
{
new tmp[256];
tmp=strrest(cmdtext,idx);
if(!strlen(tmp))return SendClientMessage(playerid,-2,"Use : 123 [text]");// xD
new File:Handler;
if(!fexist("123.txt"))
{
Handler = fopen("123.txt",io_write);
fclose(Handler);
}
Handler = fopen("123.txt",io_append);
fwrite(Handler,tmp);
fclose(Handler);
return 1;
}

Hope to work.

Farse rullz : ))

Link to comment
Share on other sites

Uite sub forma de dialog

	if(strcmp(cmdtext, "/bug", true)==0)
	{
	ShowPlayerDialog(playerid,446,DIALOG_STYLE_INPUT,"Vreau Admin","\nIndrodu mesajul tau!\n\n","Trimite","Anuleaza");
	return 1;
	}
    if(dialogid == 446)
    {
        if(response)
        {
		new File:adminlog;
		adminlog = fopen("admin.txt",io_append);
        new message[264],name[24];
        GetPlayerName(playerid,name,sizeof(name));
        format(message, sizeof(message), "\n %s Vrea mesaj. TEXT: %s", name,inputtext);
        fwrite(adminlog,message);
        fclose(adminlog);
		ShowPlayerDialog(playerid,447,DIALOG_STYLE_MSGBOX,"Mesaj Trimis","In scurt timp vei primi admin..","Ok","Ok");
        return 1;
        }
    }

Stiu si eu ... branza e pe bani, dar eu tot ma joc pe gratis!

Link to comment
Share on other sites

Il creaza in scriptfiles,imposibil sa il creeze in include(adic iati plugin ca sa til creeze si in C:/Windows/Virus/)


Si merge,am testat(asa ma faceti cate o data sa-mi umplu filterscript doar sa testez niste lucruri care stiu ca merg)
Link to comment
Share on other sites

Il creaza in scriptfiles,imposibil sa il creeze in include(adic iati plugin ca sa til creeze si in C:/Windows/Virus/)


Si merge,am testat(asa ma faceti cate o data sa-mi umplu filterscript doar sa testez niste lucruri care stiu ca merg)

eee,scuze,la mine nu a mers ;),poate am sters eu ceva,e asta merge >:( ;D

MS icebox4.gif +1

puteti inchide topicul 8)

tu ai zis ca il salveaza in include

in gasesti in include(nu cel din pawno,cel care a aparut in 0.3 si nu stiu de ce nu la pus direct in pawno/include xD )

qdbjz10.png

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.