23.11.2014, 16:38
Hello! How can I solve this?
if you type the command /savename, save the name of a text document..
if you type the command /namelist, list the names who enter the command (/savename)
Problem: Saves the name ,but /namelist command does not add up
Photo:
Save: http://www.kephost.com/image/f4M
Server: http://www.kephost.com/image/f4C
Code:
if you type the command /savename, save the name of a text document..
if you type the command /namelist, list the names who enter the command (/savename)
Problem: Saves the name ,but /namelist command does not add up
Photo:
Save: http://www.kephost.com/image/f4M
Server: http://www.kephost.com/image/f4C
Code:
Код:
#define RFILES "namelist.txt" CMD:savename(playerid,params[]) { new pname[24], File:ftw=fopen("namelist.txt", io_write); if(ftw) { GetPlayerName(playerid, pname, 24); fwrite(ftw, pname); fclose(ftw); } return 1; } CMD:namelist(playerid,params[]) { new str[256]; new oldrecord = dini_Int(RFILES,"namelist"); format(str,sizeof(str),"[Name-ALL List]: %s ",oldrecord); SCM(playerid,COLOR_SYSTEM,str); return 1; }