Object id's are bugged.
#1

Hey,I made a cmd that attaches a player a bush,but when you go ingame and try to attach it to the player it gives you a stair instead of a bush.

I have tried with other object ID's aswell,it always gives another object instead of the wanted id.

Thanks for advance! (If ya don't believe check it out yourself)

pawn Код:
CMD:attachbush(playerid,params[])
{
    AttachObjectToPlayer(702,playerid,0,0,0,0,0,0);
    return 1;
}
Reply
#2

Go read the wiki page first. Thank you.
Reply
#3

So the point is because it doesn't return a specific value?
Reply
#4

Read: https://sampwiki.blast.hk/wiki/AttachObjectToPlayer

pawn Код:
new myobject[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    myobject[playerid] = CreateObject(702, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
    return 1;
}

CMD:attachbush(playerid, params[])
{
    AttachObjectToPlayer(myobject[playerid], playerid, 0, 0, 0.0, 0.0, 0, );
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    DestroyObject(myobject[playerid]);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)