Quick dini help please
#1

Hi. I kinda got confused and I don't get this. I have the following:

Код:
dini_IntSet(file, "Something", Faction1[playerid][fLeader]);
I want to make when you type faction ID to change Faction1 to Faction[number you typed], so it looks:

Код:
dini_IntSet(file, "Something", Faction[somenumber][playerid][fLeader];
How to acomplish this?


Yesterday I made something similar and it worked but now I managed to confuse myself up by thinking of a way to do it lol.

Thanks
Reply
#2

well im not sure what exactly you want but this is what i think it is
This is only an Example
pawn Код:
if(strcmp(cmd,"/command",true) == 0){
new level = strval(tmp);
GetPlayerName(giveplayerid, pName, sizeof(pName));
format(file,sizeof(file),"/mRegistration/%sAdmin.ini",pName);
dini_Create(file);
dini_IntSet(file, "Something", Faction[somenumber][playerid][fLeader]= level;
}
This would not work u need to change some staff
Reply
#3

No, that's not what I want to do.

I want to change Faction1 to FactionX. X is some number I typed in a command.

Example:

/setleader [id] [factionID]

I type /setleader John_Doe 2

Then, the "Faction1[playerid][fLeader]);" would look like "Faction2[playerid][fLeader]);"

I hope you understand, I'm not good at explaining stuff
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)