Object
#1

Hello i have create some objects in my server and i use this "SelectObject" to edit the object but when i click on object it is select the last object i've created not the one i have selected, sorry for my english
Reply
#2

helpppppppp
Reply
#3

You'll have to provide some code at least. To me it sounds like either getting the parameters incorrectly or somewhere about detecting if the selected object is valid and actually selecting the right one.

You're using a dynamic object system right?
Reply
#4

Take a look at the video when i select object its select the last object i have created not the one i have click on i hope you understand me =/ https://www.youtube.com/watch?v=awBc...ature=*********

PHP код:
new ObjectIDModelIDFloat:oXFloat:oYFloat:oZ;
CMD:object(playerid,params[])
{
  if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playerid,red,"Command not found! Type /cmds");
  if(
sscanf(params"i"ModelID)) return SendClientMessage(playerid,red,"Create object: /object <model>");
  {
    
GetPlayerPos(playerid,oX,oY,oZ);
    
ObjectID CreateObject(ModelID,oX,oY,oZ,0,0,0);
    
EditObject(playerid,ObjectID);
  }
  return 
1;

PHP код:
CMD:select(playerid,params[])
{
  
SelectObject(playerid);
  return 
1;
}
public 
OnPlayerSelectObject(playeridtypeobjectidmodelidFloat:fXFloat:fYFloat:fZ)
{
    if(
type == SELECT_OBJECT_GLOBAL_OBJECT)
    {
      if(
IsValidObject(ObjectID))
      {
        
EditObject(playerid,ObjectID);
      }
    }
    return 
1;

Reply
#5

helppppppppppp
Reply
#6

This'll work.
pawn Код:
public OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ)
{
    if(type == SELECT_OBJECT_GLOBAL_OBJECT)
    {
      if(IsValidObject(objectid))
      {
        EditObject(playerid,objectid);
      }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)