02.03.2014, 11:20
Hello, I'm making a /leaderpanel or /lpanel in game where the leader can see all members online and offline and can warn / uninvite / giverank offline. So when you /invite your member it is saved in a list.
And the .ini file looks like this:
Anyone knows why it doesn't work? It simply doesn't change rank and slot name. Thanks for reading.
pawn Код:
new fname[20];
switch(PlayerInfo[playerid][pLeader])
{
case 1: fname = "PD.ini";
case 2: fname = "FBI.ini";
case 3: fname = "NG.ini";
case 4: fname = "Medic.ini";
case 5: fname = "Alcapone.ini";
case 7: fname = "Hitman.ini";
case 9: fname = "NR.ini";
case 10: fname = "Taxi.ini";
case 11: fname = "SI.ini";
case 16: fname = "Grove.ini";
case 17: fname = "TTC.ini";
case 18: fname = "Astecaz.ini";
default: return 1;
}
for(new slotid = 1; slotid < 10; slotid++)
{
format(ftext, sizeof(ftext), "Slot%d", slotid);
if(strcmp(dini_Get(fname, ftext), "None", true) != 0)
{
format(string, 20, "Rank%d", slotid);
dini_Set(fname, ftext, giveplayer)
dini_IntSet(fname, string, 1);
break;
}
if(slotid == 10) SendClientMessage(playerid, COLOR_GRAD2, "No slots left in your faction.");
}
pawn Код:
Slot1=None
Rank1=0
Slot2=None
Rank2=0
Slot3=None
Rank3=0
Slot4=None
Rank4=0
Slot5=None
Rank5=0
Slot6=None
Rank6=0
Slot7=None
Rank7=0
Slot8=None
Rank8=0
Slot9=None
Rank9=0
Slot10=None
Rank10=0