Load actors not work
#1

I have problem with 3DText on a Actor.
My command created actor with 3DText Desc and name on top Actor, but I shutdown my server and run again server, the actors not work because i show Desc but name not show.

Code public:

Код:
public LoadActors()
{
	new uid, query[2048], i = 0;
	new string[128];
	
	mysql_query("SELECT * FROM `srv_actors`");
	mysql_query(query);
	mysql_store_result();
	
	if(mysql_num_rows())
	{
		if(mysql_num_rows() > MAX_ACTORS) print("[ERROR][ACTORS]");
		
		while(mysql_fetch_row_format(query, "|") == 1)
		{
			sscanf(query, "p<|>d", uid);
			
			sscanf(query, "p<|>ds[32]s[128]ddffffddd",
			ActorCache[uid][aCUID],
			ActorCache[uid][aCName],
			ActorCache[uid][aCDesc],
			ActorCache[uid][aCSkin],
			ActorCache[uid][aCType],
			ActorCache[uid][aCPosX],
			ActorCache[uid][aCPosY],
			ActorCache[uid][aCPosZ],
			ActorCache[uid][aCPosA],
			ActorCache[uid][aCVW],
			ActorCache[uid][aCInt],
			ActorCache[uid][aCAnim]);
			
			i++;
			_AACTOR_COUNT = uid +1;
			
			CreateActor(ActorCache[uid][aCSkin], ActorCache[uid][aCPosX], ActorCache[uid][aCPosY], ActorCache[uid][aCPosZ], ActorCache[uid][aCPosA]);
	
			format(string, sizeof(string), "%s (ID %d)", ActorCache[uid][aCName], uid);
			ActorCache[uid][aCNameTag] = CreateDynamic3DTextLabel(string, ActorCache[uid][aCNickColor], ActorCache[uid][aCPosX], ActorCache[uid][aCPosY], ActorCache[uid][aCPosZ]+1, 10.0);

			format(string, sizeof(string), "%s", ActorCache[uid][aCDesc]);
			ActorCache[uid][aCDescTag] = CreateDynamic3DTextLabel(string, COLOR_DO, ActorCache[uid][aCPosX], ActorCache[uid][aCPosY], ActorCache[uid][aCPosZ], 10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, ActorCache[uid][aCVW], -1, -1, STREAMER_3D_TEXT_LABEL_SD, STREAMER_TAG_AREA -1, 0);
				

			for(new anim_id = 1; anim_id < MAX_ANIMS; anim_id++)
			{
				if(AnimInfo[anim_id][aUID] == ActorCache[uid][aCAnim])
				{
					ApplyActorAnimation(uid, AnimInfo[anim_id][aLib], AnimInfo[anim_id][aName], AnimInfo[anim_id][aSpeed], AnimInfo[anim_id][aOpt1], AnimInfo[anim_id][aOpt2], AnimInfo[anim_id][aOpt3], AnimInfo[anim_id][aOpt4], AnimInfo[anim_id][aOpt5]);
				}
			}
		}
	}
	
	mysql_free_result();
	printf("[LOAD] Loading %d actors.", i);
	
	return 1;
}
Reply
#2

Why you didnt use the virtual world param when created the actor Name 3DText?
Reply
#3

Virtual world and interior of both actors has to be the same and you need to be in this same virtual world to see them.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)