Holding object after reconnect
#1

Hi, i am experimenting a bit with players holding objects etc.. And iv'e stumbled upon a problem were the player still holds the object after reconnect, how can i remove the object after for example a server restart? (Obviously no object id).



Kind of annoying, well.. help appreciated
Reply
#2

Assign the object when created, to a max_players variable and destroy the player's object on disconnect.
Reply
#3

pawn Код:
if(IsValidPlayerObject(playerid, PlayerVar[playerid][WorkObject])) DestroyPlayerObject(playerid, PlayerVar[playerid][WorkObject]);
I got that under onplayerdisconnect, still the player has the object attached after reconnect.
Reply
#4

pawn Код:
DestroyPlayerObject(playerid, objectid)
DestroyObject(objectid)
this?
Reply
#5

Quote:
Originally Posted by Rayan_black
Посмотреть сообщение
pawn Код:
DestroyPlayerObject(playerid, objectid)
DestroyObject(objectid)
this?
Yes, though after an restart the variables are being reset and i can no longer destroy the object by object id ..
Reply
#6

Yes, well this "bug" or even scripting failure still persist.. Any ideas?

Guess i'm just using it wrong, so i'll post it here.
pawn Код:
PlayerVar[playerid][WorkObject] = SetPlayerAttachedObject(playerid, 0, 1582, 5, 0.370673, 0.047421, -0.026735, 48.223468, 0.000000, 0.000000);

DestroyPlayerObject(playerid, PlayerVar[playerid][WorkObject]);
That code does not remove the player object. So what am i doing wrong?
Reply
#7

This problem still exist, can't find a solution to this.
Reply
#8

Well, iv'e bumped this thread a couple of times now. But i still struggle with this.. Anyone know a solution to this problem ?
Reply
#9

Quote:
Originally Posted by Cameltoe
Посмотреть сообщение
Well, iv'e bumped this thread a couple of times now. But i still struggle with this.. Anyone know a solution to this problem ?
this^
Reply
#10

try this on player connect?
Код:
for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
        {
            RemovePlayerAttachedObject(playerid, i);
        }
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)