15.07.2010, 17:00
Код:
stock CreateGang(name[MAX_GANG_NAME],owner[MAX_PLAYER_NAME]) { new string[256],File:hFile; for(new i = 0; i < MAX_GANGS; i++) { format(string, sizeof(string), "/gangs/%d.gang", i); if(!fexist(string)) { hFile = fopen(string, io_write); format(string, sizeof(string), "%s|%s", name,owner); fwrite(hFile, string); fclose(hFile); Gangs[i][gName] = name; Gangs[i][gOwner] = owner; hFile = fopen("ganglog.log", io_append); format(string, sizeof(string), "Gang %d added: %s|%s", i, name,owner); fwrite(hFile, string); fclose(hFile); return i; } } return -1; }