Na začátek kódu:
#include <gl_common>
Pak:
OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256], idx;
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/object", true) == 0)
{
new tmp[256], objectid, Float:Pos[3];
tmp = strtok(cmdtext, idx);
objectid = strval(tmp);
if(!strlen(tmp) || objectid == 0) return SendClientMessage(playerid, -1, "Použití: /object <ID>");
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
return EditObject(playerid, CreateObject(objectid, Pos[0]+5, Pos[1], Pos[2], 0, 0, 0, 0));
}
return 0;
}