Save gang members to a file.
Then load them all name through fread and set them level...
If you do not understand, see this:
If you use MySQL, you can do this easily with just one query.
Then load them all name through fread and set them level...
If you do not understand, see this:
Code:
new File: handle = fopen("gang_members.txt", io_read), string[28], nick[24], INI: file;
if(handle)
{
while(fread(handle, nick)) {
? ? ? ? ? ? format(string, 28, "Users/%s.ini", nick);
? ? ? ? ? ? file = INI_Open(string);
? ? ? ? ? ? INI_WriteInt(file, "p_level", 100);
? ? ? ? ? ? INI_Close(file);
? ? ? ? }
fclose(handle);
} else {
print("The file \"gang_members.txt\" does not exists, or can't be opened.");
}
// Notice : The names of the members you have saved in the file 'gang_members.txt' should be the name of each one in a new line
If you use MySQL, you can do this easily with just one query.
Code:
UPDATE `users` SET `level` = `level` 100 WHERE `gangid` = 1