CreatePlayerObject always returns a bad ID
#1

I haven't used this gamemode in a while (I made it to map) and Im pretty sure it did work last time I used it. It's been 3+ months (which shouldn't effect anything), I haven't changed anything but when I try to create an object, the object isnt created and it returns the id 65535.

I tried using both my search feature and just creating the object outright, neither worked.

pawn Код:
stock CreateSavingObject(playerid, Model, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Project)
{
    new id, Query[200];
    id = CreatePlayerObject(playerid, Model, X, Y, Z, rX, rY, rZ);
    ObjectInfo[id][oX] = X;
    ObjectInfo[id][oY] = Y;
    ObjectInfo[id][oZ] = Z;
    ObjectInfo[id][orX] = rX;
    ObjectInfo[id][orY] = rY;
    ObjectInfo[id][orZ] = rZ;
    ObjectInfo[id][oModel] = Model;
    ObjectInfo[id][oProject] = Project;
    ObjectInfo[id][oID] = id;
    new string[100];
    format(string, sizeof(string), "You have created an object in slot %d.", id);
    InfoMessage(pid, string);
    format(Query,sizeof(Query), "INSERT INTO `OBJECTS` (`PROJECT`, `MODEL`) VALUES (%d, %d, %d)", Project, Model);
    mysql_query(Query);
    EditPlayerObject(pid, id);
    return 1;
}
Reply
#2

Show us your new ObjectInfo line.
Reply
#3

Quote:
Originally Posted by jihadmeneer
Посмотреть сообщение
Show us your new ObjectInfo line.
What does that have to do with CreatePlayerObject? The variable isnt changed
Reply
#4

Did you perhaps go over the maximum objects allowed in-game?
Reply
#5

Do you use streamer plugin? Streamer uses CreatePlayerObject function and it might has reached the limit so it returns INVALID_OBJECT_ID.
Reply
#6

Tried commenting out streamer, there are no objects spawned in the game. Didn't fix.
Reply
#7

Also just tried changing CreatePlayerObject to CreateObject
Reply
#8

hm, even though there were no objects created, I made a command to remove all objects then it worked fine. Must be something conflicting with it. Thanks guys
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)