PHP код:
CMD:createobject(playerid, params[])
{
new objectid;
new Float:x, Float:y, Float:z;
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You have to be Rcon Admin");
if(sscanf(params, "u", objectid)) return SendClientMessage(playerid, -1, "Usage: /crateobject (Object ID)");
new pos = GetPlayerPos(playerid, x, y, z);
CreateObject(objectid, x+2, y, z, 0.0, 0.0, 96.0);
new Float:X, Float:Y, Float:Z;
GetObjectPos(X, Y, Z);
new Float:b, Float:c, Float:d;
GetObjectRot(b, c, d);
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"Object");
INI_WriteInt(File,"Object ID",objectid);
INI_WriteInt(File,"XPos",X);
INI_WriteInt(File,"YPos",Y);
INI_WriteInt(File,"ZPos",Z);
INI_WriteInt(File,"XRot",b);
INI_WriteInt(File,"YRot",c);
INI_WriteInt(File,"ZRot",d);
INI_Close(File);
SendClientMessage(playerid, -1, "Object created");
return 1;
}