How can I redefined Streamer function
#1

Error:
Код:
_ALS_UpdateDynamic3DTextLabelTe" is truncated to 31 characters...
CE_UpdateDynamic3DTextLabelText not work also if call function directly

Код:
#if defined _streamer_included	

	stock STREAMER_TAG_3D_TEXT_LABEL CE_CreateDynamic3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 100.0)	
	{	
		CE_Convert(text);	
		new  STREAMER_TAG_3D_TEXT_LABEL ce_3dtextid = CreateDynamic3DTextLabel(text, color, x, y, z, drawdistance, attachedplayer, attachedvehicle, testlos, worldid, interiorid, playerid, distance);	
		return ce_3dtextid;	
	}

	stock CE_UpdateDynamic3DTextLabelText(STREAMER_TAG_3D_TEXT_LABEL id, color, const text[])	
	{	
		CE_Convert(text);	
		UpdateDynamic3DTextLabelText(id, color, text);		
	}

#endif

stock Text3D:CE_Create3DTextLabel(text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance, virtualworld = -1, testLOS = 0) {	
	CE_Convert(text);
	new Text3D:ce_3dtextid = Create3DTextLabel(text, color, X, Y, Z, DrawDistance, virtualworld, testLOS);	
	return ce_3dtextid;
}

stock CE_Update3DTextLabelText(Text3D:id, color, text[]) {
	CE_Convert(text);
	Update3DTextLabelText(id, color, text);
}

	#if defined _streamer_included
		#if defined _ALS_CreateDynamic3DTextLabel
			#undef CreateDynamic3DTextLabel
		#else	
			#define _ALS_CreateDynamic3DTextLabel
		#endif

		#define CreateDynamic3DTextLabel CE_CreateDynamic3DTextLabel	
		#define UpdateDynamic3DTextLabelText CE_UpdateDynamic3DTextLabelText
	#endif
This is my current Include file, Already remove them.

Код:
native CE_Convert(const string[]);
native CE_CountTag(const string[]);
native CE_Convert_TAPLIST(const string[]);

new ce_dialog_btn1[32];

stock CE_SendClientMessage(playerid, color, const text[], {Float, _}:...)
{
	static
	    args,
	    str[144];

	if ((args = numargs()) == 3)
	{
		CE_Convert(text);
		SendClientMessage(playerid, color, text);
	}
	else
	{
		while (--args >= 3)
		{
			#emit LCTRL 5
			#emit LOAD.alt args
			#emit SHL.C.alt 2
			#emit ADD.C 12
			#emit ADD
			#emit LOAD.I
			#emit PUSH.pri
		}
		#emit PUSH.S text
		#emit PUSH.C 144
		#emit PUSH.C str
		#emit PUSH.S 8
		#emit SYSREQ.C format
		#emit LCTRL 5
		#emit SCTRL 4

		CE_Convert(str);
		SendClientMessage(playerid, color, str);

		#emit RETN
	}
	return 1;
}

stock CE_SendClientMessageToAll(color, const text[], {Float, _}:...)
{
	static
	    args,
	    str[144];

	if ((args = numargs()) == 2)
	{
		CE_Convert(text);	
	    SendClientMessageToAll(color, text);
	}
	else
	{
		while (--args >= 2)
		{
			#emit LCTRL 5
			#emit LOAD.alt args
			#emit SHL.C.alt 2
			#emit ADD.C 12
			#emit ADD
			#emit LOAD.I
			#emit PUSH.pri
		}
		#emit PUSH.S text
		#emit PUSH.C 144
		#emit PUSH.C str
		#emit LOAD.S.pri 8
		#emit ADD.C 4
		#emit PUSH.pri
		#emit SYSREQ.C format
		#emit LCTRL 5
		#emit SCTRL 4

		CE_Convert(str);	
		SendClientMessageToAll(color, str);

		#emit RETN
	}
	return 1;
}

stock CE_ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[]) {	
	CE_Convert(caption);

	if(strlen(button1) > 1) {
		format(ce_dialog_btn1, sizeof ce_dialog_btn1, button1);
	}

	if(style == 4 || style == 5) { // DIALOG_STYLE_TABLIST & DIALOG_STYLE_TABLIST_HEADERS
		CE_Convert_TAPLIST(info);	
	}
	else {
		CE_Convert(info);	
	}
	// Need to save that button1 text because after CE_Convert will increase length by 1 then make button1 not work !!

	return ShowPlayerDialog(playerid, dialogid, style, caption, info, ce_dialog_btn1, button2);
}	

#if defined CE_AUTO	

	#if defined _ALS_ShowPlayerDialog	
		#undef ShowPlayerDialog	
	#else	
		#define _ALS_ShowPlayerDialog	
	#endif	

	#define ShowPlayerDialog CE_ShowPlayerDialog	

	#if defined _ALS_SendClientMessage	
		#undef SendClientMessage	
	#else	
		#define _ALS_SendClientMessage	
	#endif	
	#define SendClientMessage CE_SendClientMessage


	#if defined _ALS_SendClientMessageToAll
		#undef SendClientMessageToAll
	#else	
		#define _ALS_SendClientMessageToAll
	#endif	
	#define SendClientMessageToAll CE_SendClientMessageToAll
 #endif
Reply


Messages In This Thread
How can I redefined Streamer function - by bigtigerbeee - 16.10.2018, 12:00

Forum Jump:


Users browsing this thread: 1 Guest(s)