INI_ParseFile
#5

Bro, Actors are not getting loaded:
Код:
forward LoadActor_data(name[],value[]);
public LoadActor_data(name[],value[])
{
	new ActorInfo[2],Float:Pos[4];
	INI_Int("Skin",ActorInfo[0]);
	INI_Float("PosX",Pos[0]);
	INI_Float("PosY",Pos[1]);
	INI_Float("PosZ",Pos[2]);
	INI_Float("Angle",Pos[3]);
	INI_Int("VirtualWorld",ActorInfo[1]);
	new Actor = CreateActor(ActorInfo[0], Pos[0], Pos[1], Pos[2], Pos[3]);
	SetActorVirtualWorld(Actor, ActorInfo[1]);
 	return 1;
}

OnGameModeInit()
{
	for(new actorid=0; actorid < MAX_ACTORS; actorid++)
	{
		INI_ParseFile(ActorPath(actorid), "LoadActor_%s");
	}
        return 1;
}
This is a name of one of my actors files: Actor_0
Reply


Messages In This Thread
INI_ParseFile - by aCloudy - 06.05.2015, 18:24
Re: INI_ParseFile - by Smileys - 06.05.2015, 18:44
Re: INI_ParseFile - by aCloudy - 06.05.2015, 18:54
Re: INI_ParseFile - by Jefff - 06.05.2015, 19:50
Re: INI_ParseFile - by aCloudy - 07.05.2015, 06:40

Forum Jump:


Users browsing this thread: 2 Guest(s)