Home » Renegade Discussions » Mod Forum » .ini
Re: .ini [message #447144 is a reply to message #447011] |
Thu, 12 May 2011 11:31 |
robbyke
Messages: 348 Registered: September 2010 Location: Belgium
Karma:
|
Recruit |
|
|
ok ive done this
gmmain.cpp:
Toggle Spoiler
/* Renegade Scripts.dll
SSGM main functions and classes
Copyright 2007 Vloktboky, Whitedragon(MDB), Mac, Jonathan Wilson
This file is part of the Renegade scripts.dll
The Renegade scripts.dll is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version. See the file COPYING for more details.
In addition, an exemption is given to allow Run Time Dynamic Linking of this code with any closed source module that does not contain code covered by this licence.
Only the source code to the module(s) containing the licenced code has to be released.
*/
#include "scripts.h"
#include "engine.h"
#include "gmmain.h"
//Yep, a file just for this.
SettingsStruct *Settings = 0;
DataStruct *Data = 0;
mes *KB_ME = 0;
void mes::Load(GameObject *obj){
std::string me;
const char*name = Get_Player_Name(obj);
SettingsLoader::Load();
new mes("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);
}
};
under gmmain.he
struct mes: public virtual SettingsLoader{
mes(const char *ININame) : SettingsLoader(ININame){}
std::string me;
void Load(GameObject *obj);
extern mes *KB_ME;
};
however i dont even have the slightest clue why
Owner of kambot TT server
kambot.freeforums.org
[Updated on: Thu, 12 May 2011 11:31] 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: Fri Dec 20 02:06:44 MST 2024
Total time taken to generate the page: 0.00860 seconds
|