cmd(listraces, playerid, params[]) { new j = 0; new filename[64]; new insert[65]; new string[128]; while(ffind("maps/*.txt", filename, sizeof filename, j)) { format(insert, 65, "|%s", filename); for(new x = 0; x < 128; x++) { if(string[x] != '\0') continue; if(strlen(string) + strlen(insert) <= 128) { strins(string, insert, x); } else goto add; } add: SendClientMessage(playerid, COLOR_GRAD1, string); strdel(string, 0, 128); return 1; } if(strlen(string)) SendClientMessage(playerid, COLOR_GRAD1, string); }
Originally Posted by big comfy couch
Код:
cmd(listraces, playerid, params[]) { new j = 0; new filename[64]; new insert[65]; new string[128]; while(ffind("maps/*.txt", filename, sizeof filename, j)) { format(insert, 65, "|%s", filename); for(new x = 0; x < 128; x++) { if(string[x] != '\0') continue; if(strlen(string) + strlen(insert) <= 128) { strins(string, insert, x); } else goto add; } add: SendClientMessage(playerid, COLOR_GRAD1, string); strdel(string, 0, 128); return 1; } if(strlen(string)) SendClientMessage(playerid, COLOR_GRAD1, string); } |
dcmd_listraces(playerid, params[]) { new j = 0; new filename[64]; new insert[65]; new string[128]; while(ffind("maps/*.txt", filename, sizeof filename, j)) { format(insert, 65, "|%s", filename); for(new x = 0; x < 128; x++) { if(string[x] != '\0') continue; if(strlen(string) + strlen(insert) <= 128) { strins(string, insert, x); } else goto add; } add: SendClientMessage(playerid, COLOR_GRAD1, string); strdel(string, 0, 128); return 1; } if(strlen(string)) SendClientMessage(playerid, COLOR_GRAD1, string); }