27.01.2015, 19:41
Hey when im using the following command its editing the object but returning command not found in the server.
enum:
Why the command isn't working??
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;
}
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];