26.08.2010, 01:06
Okay, im trying to make a /suggest command where players can type for example: /suggest you should make some buyable houses
and it will leave a folder called Suggestions in my scriptfiles with that in it this is what i got
I dont normaly set the strings to 256 its just that the file only saved half my message if i say "You should make some more enterable houses, that would be nice
", it would come out as
Suggestion: name=You should make some more enterable houses that
and also if i type another suggestion it overwrites the last suggestion how do i make it go onto a new line?
and it will leave a folder called Suggestions in my scriptfiles with that in it this is what i got
Код:
CMD:suggest(playerid,params[]) { new suggestion[256], str[256],name[MAX_PLAYER_NAME]; if(sscanf(params,"s[256]",suggestion)) { SendClientMessage(playerid, 0xFF0000FF, "USAGE: /suggest [SUGGESTION]"); return 1; } GetPlayerName(playerid,name,sizeof(name)); if(!dini_Exists("NewAdmin/Config/Suggestions.txt")) { dini_Create("NewAdmin/Config/Suggestions.txt"); format(str,sizeof(str),"%s: %s",name,suggestion); dini_Set("NewAdmin/Config/Suggestions.txt","Suggestion:",str); } else { format(str,sizeof(str),"%s: %s",name,suggestion); dini_Set("NewAdmin/Config/Suggestions.txt","Suggestion:",str); SendClientMessage(playerid,LIGHTBLUE,"Thanks for your suggestion, we will look into it..."); } return 1; }

Suggestion: name=You should make some more enterable houses that
and also if i type another suggestion it overwrites the last suggestion how do i make it go onto a new line?