Problem With EditObject
#1

Hi guys, i have problem with EditObject function!

i have this:
Код:
ObjEdita[playerid]=CreateObject(2942,x,y,z+3,0,0,0); //ATM
EditObject(playerid,ObjEdita[playerid]);
and when i use that command for this EditObject, it would not show me arrows and create that object...

its should be like this: https://sampwiki.blast.hk/wroot/images2/...tingObject.png

and in my case dont show nothing
Reply
#2

BUMP
Reply
#3

What is this code under? A callback, a command?
Reply
#4

Quote:
Originally Posted by BenzoAMG
Посмотреть сообщение
What is this code under? A callback, a command?
here is public of OnPlayerEditObject:
Код:
public OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ)
{
    if(response == EDIT_RESPONSE_FINAL)
	{
	if(ObjEdita[playerid]!=-1)
	{
	new i=ObjeditaId[playerid];
	ATMI[i][aPozx]=fX;
    ATMI[i][aPozy]=fY;
    ATMI[i][aPozz]=fZ;
    ATMI[i][aRotx]=fRotX;
    ATMI[i][aRoty]=fRotY;
    ATMI[i][aRotz]=fRotZ;
    DestroyObject(ObjEdita[playerid]);
    SaveATM(i);
    ATMukras(i);
	ObjEdita[playerid]=-1;
	ObjeditaId[playerid]=-1;
	}
	}
	return 1;
}
and here is full command
Код:
if(strcmp(x_nr,"napravi",true) == 0)
{
new i;
if(ObjeditaId[playerid]!=-1)return SendClientMessage(playerid,-1, "Vec editujete objekat!");
for(new h=1;h<999;h++){new FileName[328];format(FileName, sizeof(FileName), "ATM/ATM_%d.ini",h);if(!fexist(FileName)){i=h;h=998;}}
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
ObjEdita[playerid]=CreateObject(2942,x,y,z+3,0,0,0); //ATM
EditObject(playerid,ObjEdita[playerid]);
ObjeditaId[playerid]=i;
ATMI[i][aPostavljen]=1;
ATMI[i][aKasa]=5000;
ATMI[i][aOpljackan] = 0;
new FileName[328];
format(FileName, sizeof(FileName), "ATM/ATM_%d.ini",i);
fopen(FileName, io_write);
SaveATM(i);
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)