INI files help
#1

Hello, This command (below) is to create actors (Added in 0.3.7), Can someone make this command below to save the Actor I create using y_ini? And OnGameModeInit, It loads all the created actors, And I want a command to destroy an actor.
The command:
Код:
CMD:createactor(playerid, params[])
{
	new Float:X, Float:Y, Float:Z, Float:fa, skin, string[128], world = GetPlayerVirtualWorld(playerid), Actor;
	if(AdminLevel[playerid] < 5) return SCM(playerid, COLOR_WHITE, ""WORD_NADMIN"");
	if(IsPlayerInAnyVehicle(playerid)) return SCM(playerid, COLOR_WHITE, ""WORD_ERROR"You cannot create actors while inside a vehicle.");
	if(sscanf(params, "i", skin)) return SCM(playerid, COLOR_WHITE, ""WORD_USAGE"/createactor [SKIN_ID]");
	if(skin < 0) return SCM(playerid, COLOR_WHITE, ""WORD_ERROR"Invalid skin ID.");
	if(skin > 311) return SCM(playerid, COLOR_WHITE, ""WORD_ERROR"Invalid skin ID.");
	GetPlayerPos(playerid, X, Y, Z);
	GetPlayerFacingAngle(playerid, fa);
	Actor = CreateActor(skin, X, Y, Z, fa);
	SetActorVirtualWorld(Actor, world);
	ClearActorAnimations(Actor);
	format(string, sizeof(string), ""WORD_SERVER"You have created a new actor with skin: %d", skin);
	SCM(playerid, COLOR_WHITE, string);
	return 1;
}
Thanks for reading,
+REP for the person who helps!
Reply


Messages In This Thread
INI files help - by aCloudy - 05.05.2015, 19:37
Re: INI files help - by aCloudy - 06.05.2015, 15:46
Re: INI files help - by MP2 - 06.05.2015, 15:49

Forum Jump:


Users browsing this thread: 1 Guest(s)