Home » Renegade Discussions » Mod Forum » .ini
Re: .ini [message #447046 is a reply to message #447036] |
Wed, 11 May 2011 14:43 |
snazy2000
Messages: 67 Registered: December 2007
Karma:
|
Recruit |
|
|
void mes::Load(GameObject *obj){
std::string me;
const char*name = Get_Player_Name(obj);
SettingsLoader::Load();
mes = new mes("***********.ini");
LoadSString(me,name,"NULL",true,true,false);
char preset[500];
char skin[500];
char shield[500];
char powerups[500];
char scripts[500];
char scriptparam[500];
float price = 0;
float hp =0;
float ap =0;
for (int z = 1; ; ++z) {
if (z==1||z==3||z==4)
{
switch(z)
{
case 1:
price = INI->Get_Float(me.c_str(),StrFormat("%02d",z).c_str(),0);
case 3:
hp = INI->Get_Float(me.c_str(),StrFormat("%02d",z).c_str(),0);
case 4:
ap = INI->Get_Float(me.c_str(),StrFormat("%02d",z).c_str(),0);
}
}
else
{
switch(z)
{
case 2:
INI->Get_String(me.c_str(),StrFormat("%02d",z).c_str(),"",preset,500);
case 5:
INI->Get_String(me.c_str(),StrFormat("%02d",z).c_str(),"",skin,500);
case 6:
INI->Get_String(me.c_str(),StrFormat("%02d",z).c_str(),"",shield,500);
case 7:
INI->Get_String(me.c_str(),StrFormat("%02d",z).c_str(),"",powerups,500);
case 8:
INI->Get_String(me.c_str(),StrFormat("%02d",z).c_str(),"",scripts,500);
case 9:
INI->Get_String(me.c_str(),StrFormat("%02d",z).c_str(),"",scriptparam,500);
}
}
}
if (price==0)
{
int pID = Get_Player_ID(obj);
Console_Input(StrFormat("CMSGP %d 255,0,0 Request your me on the forums.",pID).c_str());
}
else
{
//KB_Purchase_Char(obj,"me",2,price,preset,hp,ap,skin,shield,powerups,scripts,scriptparam);
}
};
struct mes: public virtual SettingsLoader{
mes(const char *ININame) : SettingsLoader(ININame){}
void Load(GameObject *obj);
};
Compiles fine for me.
[Updated on: Thu, 12 May 2011 00:27] Report message to a moderator
|
|
|
|
|
.ini
By: robbyke on Wed, 11 May 2011 07:21
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Wed, 11 May 2011 09:33
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Wed, 11 May 2011 13:50
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Wed, 11 May 2011 13:54
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Wed, 11 May 2011 22:37
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Thu, 12 May 2011 08:51
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Thu, 12 May 2011 11:31
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Thu, 12 May 2011 12:00
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Sat, 14 May 2011 05:24
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Sat, 14 May 2011 06:31
|
|
|
Re: .ini
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Sat, 14 May 2011 23:59
|
Goto Forum:
Current Time: Sun Dec 29 10:26:12 MST 2024
Total time taken to generate the page: 0.00845 seconds
|