Object Editor command problem
#1

Hey when im using the following command its editing the object but returning command not found in the server.

pawn Код:
CMD:object(playerid, params[])
{
    new object, description[64], string[128];
    //if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"You cant use this command!");
    if(sscanf(params,"ds[64]",object, description)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /object [objectid] [description]");
    new Float:px, Float:py, Float:pz, Float:rx, Float:ry, Float:rz;
    GetPlayerPos(playerid, px, py, pz);
    new newobject = CreateDynamicObject(object, px+2, py+2, pz, 0.0, 0.0, 0.0);
    EditDynamicObject(playerid, newobject);
    InGameObjects[newobject][oObjectDesc] = description;
    InGameObjects[newobject][oID] = 0;
    InGameObjects[newobject][oObjectID] = object;
    format(string, sizeof(string),"{0BDDC4}[Object Editor]{FFFFFF} Editing objectid %d, sqlid %d, description: %s", object, newobject, description);
    SendClientMessage(playerid, COLOR_WHITE, string);
    return 1;
}
enum:
pawn Код:
enum _igObjects
{
    oID,
    oObjectID, // Model ID
    Float:ofX,
    Float:ofY,
    Float:ofZ,
    Float:orX,
    Float:orY,
    Float:orZ,
    oObjectDesc[64]
};
new InGameObjects[MAX_IG_OBJECTS][_igObjects];
Why the command isn't working??
Reply
#2

Do you see SendClientMessage in command? if not
1. MAX_IG_OBJECTS is too small
2. new newobject = CreateDynamicObject created ID is out of MAX_IG_OBJECTS
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)