Little help would be appreciated.
#1

Hey, whenever i create a furniture or walltag.. I cant edit it.. it tells me to click on object but I'm constantly clicking but it isnt working..


Код:
public onWallTagCreate(playerid, text[]) {
	if(strlen(text) < 1 || strlen(text) >= MAX_WALLTAG_TITLE) {
		SendClientMessage(playerid, X11_TOMATO_2, "The text you're trying to enter is either too short or too long!");
		wallTagCreate(playerid);
		return 1;
	}
	new sqlfamilyid = GetPVarInt(playerid,"Family");
	new Float:X,Float:Y,Float:Z,Float:RotZ,VW,Interior;
	GetPlayerPos(playerid, X, Y, Z);
	GetPlayerFacingAngle(playerid, RotZ);
	Interior = GetPlayerInterior(playerid);
	VW = GetPlayerVirtualWorld(playerid);
	new color = GetPVarInt(playerid, "WallTagColorIndex");
	CreateTag(sqlfamilyid, X, Y, Z, 0,0,RotZ+90.0, Interior, VW, text, color, playerid);
	SetTimerEx("UpdatePlayerObjectsAtPos",1000, false, "d", playerid);
	movePlayerBack(playerid, 2.0);
	wallTagEdit(playerid);
	SendClientMessage(playerid, COLOR_LIGHTGREEN, "[INFO]: Select the object to edit it.");
	return 1;
}
Код:
walltagsOnPlayerEditObject(playerid, objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz) {
	query[0] = 0;//[128];
	if(response != EDIT_RESPONSE_FINAL) {
		return 0;
	}
	new sqlid = findWallTagSQLIDByObjID(objectid);
	new index = findWallTagByObjID(objectid);
	if(index != -1) {
		WallTagInfo[index][pWallTagX] = x;
		WallTagInfo[index][pWallTagY] = y;
		WallTagInfo[index][pWallTagZ] = z;
		WallTagInfo[index][pWallTagRotX] = rx;
		WallTagInfo[index][pWallTagRotY] = ry;
		WallTagInfo[index][pWallTagRotZ] = rz;
		SendClientMessage(playerid, X11_TOMATO_2, "Tag position saved!");
		format(query, sizeof(query), "UPDATE `walltags` SET `X` = %f, `Y` = %f, `Z` = %f, `rotx` = %f, `roty` = %f, `rotz` = %f WHERE `id` = %d",x,y,z,rx,ry,rz,sqlid);
		SetDynamicObjectPos(objectid, x, y, z);
		SetDynamicObjectRot(objectid, rx, ry, rz);
		mysql_function_query(g_mysql_handle, query, true, "EmptyCallback","");
	}
	return 1;
}
Код:
public wallTagEdit(playerid) {
	SetPVarInt(playerid, "MovingTag", 1);
	SelectObject(playerid);
	return 1;
}
public wallTagDelete(playerid) {
	SetPVarInt(playerid, "MovingTag", 2);
	SelectObject(playerid);
	return 1;
}
public chooseTagColor(playerid) {
	dialogstr[0] = 0;
	new temptxt[256];
	for(new i=1;i<sizeof(FamilyColours);i++) {
		format(temptxt, sizeof(temptxt), "{%s}Sample %d\n",getColourString(FamilyColours[i]),i);
		strcat(dialogstr,temptxt,sizeof(dialogstr));
	}
	ShowPlayerDialog(playerid, EWallTags_ChooseTagColor, DIALOG_STYLE_LIST, "{00BFFF}Choose a Tag Colour",dialogstr, "Ok", "Cancel");
}
public onChooseTagColor(playerid, index) {
	SendClientMessage(playerid, COLOR_LIGHTGREEN, "[INFO]: You've chosen a tag color!");
	SetPVarInt(playerid, "WallTagColorIndex", index+1);
	wallTagCreate(playerid);
	return 1;
}
Reply
#2

Anyone?
Reply
#3

http://forum.sa-mp.com/showpost.php?...41&postcount=2
Reply
#4

Quote:
Originally Posted by Eoussama
Посмотреть сообщение
Already did for every editable toy in the script.. doesn't work..

Код:
public OnPlayerEditDynamicObject(playerid, objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz) {
	safesOnPlayerEditObject(playerid, objectid, response, x, y, z, rx, ry, rz);
	houseFurnOnPlayerEditObject(playerid, objectid, response, x, y, z, rx, ry, rz);
	leoOnPlayerEditObject(playerid, objectid, response, x, y, z, rx, ry, rz);
	walltagsOnPlayerEditObject(playerid, objectid, response, x, y, z, rx, ry, rz);
	carToysOnEditObject(playerid, objectid, response, x, y, z, rx, ry, rz);
	Streamer_Update(playerid);
}
public OnPlayerSelectDynamicObject(playerid, objectid, modelid, Float:x, Float:y, Float:z) {
	walltagsOnPlayerSelectObject(playerid, objectid, modelid, x, y, z);
	safesOnPlayerSelectObject(playerid, objectid, modelid, x, y, z);
	houseFurnOnPlayerSelectObject(playerid, objectid, modelid, x, y, z);
	leoOnPlayerSelectObject(playerid, objectid, modelid, x, y, z);
	cartoysOnPlayerSelectObject(playerid, objectid, modelid, x, y, z);
	Streamer_Update(playerid);
}
Reply
#5

Why not just use "EditObject"
Reply
#6

Quote:
Originally Posted by JasonRiggs
Посмотреть сообщение
Why not just use "EditObject"
i did, same error
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)