How to remove this
#1


How do i remove that white code from objects i created in game
Reply
#2

Can you tell us which filterscript/include are you using to create objects ingame?
Reply
#3

I have it in my gamemode im using zgaming edit.
Код:
CMD:createobj(playerid, params[])
{
	new string[128], object;
   	if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
	if(PlayerInfo[playerid][pMapper] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
	if(!mDuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not on Mapper Duty.");
	if(sscanf(params, "i", object)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /createobj [objectid]");

	for(new idx=1; idx<MAX_OBJ; idx++)
	{
	    if(!ObjInfo[idx][oModel])
	    {
	        GetPlayerPos(playerid, ObjInfo[idx][oX], ObjInfo[idx][oY], ObjInfo[idx][oZ]);
  			ObjInfo[idx][oModel] = object;
  			oldoID = ObjInfo[idx][oModel];
  			oldodX = ObjInfo[idx][oX];
  			oldodY = ObjInfo[idx][oY];
  			oldodZ = ObjInfo[idx][oZ];
  			oldodRX = ObjInfo[idx][oRX];
  			oldodRY = ObjInfo[idx][oRY];
  			oldodRZ = ObjInfo[idx][oRZ];
			ObjInfo[idx][oX] = ObjInfo[idx][oX] + 2;
			ObjInfo[idx][oY] = ObjInfo[idx][oY] + 2;
			ObjInfo[idx][oRX] = 0;
			ObjInfo[idx][oRY] = 0;
			ObjInfo[idx][oRZ] = 0;
			// Creating
            ObjInfo[idx][obj] = CreateDynamicObject(ObjInfo[idx][oModel], ObjInfo[idx][oX], ObjInfo[idx][oY], ObjInfo[idx][oZ], ObjInfo[idx][oRX], ObjInfo[idx][oRY], ObjInfo[idx][oRZ]);
			// Text
			format(string, sizeof(string), "MapperWarn: %s has created object ID %d. (Object: %d)", RPN(playerid), idx, object);
		    SendMapperMessage(COLOR_GREEN, 1, string);
			Log("logs/cbject.log", string);
			idx = MAX_OBJ;
		}
	}
	return 1;
}




CMD:editobj(playerid, params[])
{
	new string[128], idx;
	if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
	if(PlayerInfo[playerid][pMapper] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
	if(!mDuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not on Mapper Duty.");
	if(sscanf(params, "i", idx)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /editobj [objectid]");
    if(!ObjInfo[idx][oModel]) return SendClientMessage(playerid, COLOR_GREY, "Invalid object id.");
	oEdit[playerid] = 1;
	oEditID[playerid] = idx;
	GetDynamicObjectPos(ObjInfo[idx][obj], oPos[playerid][0], oPos[playerid][1], oPos[playerid][2]);
	GetDynamicObjectRot(ObjInfo[idx][obj], oRot[playerid][0], oRot[playerid][1], oRot[playerid][2]);
	EditDynamicObject(playerid, ObjInfo[idx][obj]);
    format(string, sizeof(string), " You are now editing object ID %d's position.", idx);
    SendClientMessage(playerid, COLOR_WHITE, string);
    format(string, sizeof(string), "MapperWarn: %s is editting object ID %d's position.)", RPN(playerid), idx);
    SendMapperMessage(COLOR_GREEN, 1, string);
	return 1;
}

CMD:duplicateobj(playerid, params[])
{
    new string[128] ,idx;
   	if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
	if(PlayerInfo[playerid][pMapper] < 2) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
	if(!mDuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not on Mapper Duty.");
		for(idx=1; idx<MAX_OBJ; idx++)
		{
		    if(!ObjInfo[idx][oModel])
		    {
				ObjInfo[idx][oModel] = oldoID;
				ObjInfo[idx][oX] = oldodX;
				ObjInfo[idx][oY] = oldodY;
				ObjInfo[idx][oZ] = oldodZ;
				ObjInfo[idx][oRX] = oldodRX;
				ObjInfo[idx][oRY] = oldodRY;
				ObjInfo[idx][oRZ] = oldodRZ;
				// Creating
				ObjInfo[idx][obj] = CreateDynamicObject(oldoID, oldodX, oldodY, oldodZ, oldodRX, oldodRY, oldodRZ);
				ObjInfo[idx][oText] = CreateDynamic3DTextLabel(string, COLOR_WHITE, oldodX, oldodY, oldodZ, 10);
				// Text
				format(string, sizeof(string), "MapperWarn: %s has created object ID %d. (Object: %d)", RPN(playerid), idx, oldoID);
			    SendMapperMessage(COLOR_GREEN, 1, string);
				Log("logs/objects.log", string);
				idx = MAX_OBJ;
			}
		}
	return 1;
}



CMD:nearobj(playerid, params[])
{
    new string[128];
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
	if(PlayerInfo[playerid][pMapper] < 2) return SendClientMessage(playerid, COLOR_GREY, "You are not an authorized to use this command.");
	if(!mDuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not on Mapper Duty.");
    for(new idx=1; idx<MAX_OBJ; idx++)
	{
		if(IsPlayerInRangeOfPoint(playerid, 5, ObjInfo[idx][oX], ObjInfo[idx][oY], ObjInfo[idx][oZ]))
		{
		    format(string, sizeof(string), "Nearest Object ID: %d", idx);
		    SendClientMessage(playerid, COLOR_GREEN, string);
		    return 1;
		}
	}
	SendClientMessage(playerid, COLOR_GREY, "You are not near a object!");
	return 1;
}
Reply
#4

PHP код:
ObjInfo[idx][oText] = CreateDynamic3DTextLabel(stringCOLOR_WHITEoldodXoldodYoldodZ10); 
Either delete that line from CMD:duplicateobj or make a command to delete the Dynamic3DTextLabel that variable is holding.
Reply
#5

I've removed it and it still showed up
Reply
#6

Show the script that loads the objects when the gamemode initiates.
Reply
#7

Do you have any of these callbacks in your gamemode? If so, show them here.

Код:
OnDynamicObjectMoved(objectid)

OnPlayerEditDynamicObject(playerid, objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz)

OnPlayerSelectDynamicObject(playerid, objectid, modelid, Float:x, Float:y, Float:z)
Reply
#8

Quote:
Originally Posted by Arthur Kane
Посмотреть сообщение
Show the script that loads the objects when the gamemode initiates.
Код:
stock LoadCsObjects()
{
	new dinfo[15][128];
	new string[256];
	new File:file = fopen("objects22.cfg", io_read);
	if(file)
	{
	    new idx = 1;
		while(idx < MAX_OBJ)
		{
		    fread(file, string);
		    split(string, dinfo, '|');
			ObjInfo[idx][oModel] = strval(dinfo[0]);
			ObjInfo[idx][oX] = floatstr(dinfo[1]);
			ObjInfo[idx][oY] = floatstr(dinfo[2]);
			ObjInfo[idx][oZ] = floatstr(dinfo[3]);
			ObjInfo[idx][oRX] = floatstr(dinfo[4]);
			ObjInfo[idx][oRY] = floatstr(dinfo[5]);
			ObjInfo[idx][oRZ] = floatstr(dinfo[6]);
			if(ObjInfo[idx][oModel]) // If gate exists
			{
				ObjInfo[idx][obj] = CreateDynamicObject(ObjInfo[idx][oModel], ObjInfo[idx][oX], ObjInfo[idx][oY], ObjInfo[idx][oZ], ObjInfo[idx][oRX], ObjInfo[idx][oRY], ObjInfo[idx][oRZ]);
				ObjInfo[idx][oText] = CreateDynamic3DTextLabel(string, COLOR_WHITE, ObjInfo[idx][oX], ObjInfo[idx][oY], ObjInfo[idx][oZ], 10);
			}
			idx++;
	    }
	}
	print("Objects loaded successfully.");
	return 1;
}

stock LoadCsgObjects()
{
	new dinfo[15][128];
	new string[256];
	new File:file = fopen("objects22g.cfg", io_read);
	if(file)
	{
	    new idx = 1;
		while(idx < MAX_gOBJ)
		{
		    fread(file, string);
		    split(string, dinfo, '|');
			ObjgInfo[idx][ogModel] = strval(dinfo[0]);
			ObjgInfo[idx][ogX] = floatstr(dinfo[1]);
			ObjgInfo[idx][ogY] = floatstr(dinfo[2]);
			ObjgInfo[idx][ogZ] = floatstr(dinfo[3]);
			ObjgInfo[idx][ogRX] = floatstr(dinfo[4]);
			ObjgInfo[idx][ogRY] = floatstr(dinfo[5]);
			ObjgInfo[idx][ogRZ] = floatstr(dinfo[6]);
			if(ObjgInfo[idx][ogModel]) // If gate exists
			{
				ObjgInfo[idx][gobj] = CreateDynamicObject(ObjgInfo[idx][ogModel], ObjgInfo[idx][ogX], ObjgInfo[idx][ogY], ObjgInfo[idx][ogZ], ObjgInfo[idx][ogRX], ObjgInfo[idx][ogRY], ObjgInfo[idx][ogRZ]);
				ObjgInfo[idx][goText] = CreateDynamic3DTextLabel(string, COLOR_WHITE, ObjgInfo[idx][ogX], ObjgInfo[idx][ogY], ObjgInfo[idx][ogZ], 10);
			}
			idx++;
	    }
	}
	print("Objects loaded successfully.");
	return 1;
}
Reply
#9

Fixed thanks anyways
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)