Streamer CP's aren't destroyed
#9

Quote:
Originally Posted by [uL]Pottus
Посмотреть сообщение
That is strange indeed, it almost sounds like another CP is being created overwriting your reference but this code here
will delete any CP's associated with the player.

pawn Код:
new amountCPs = CountDynamicCPs();
    for(new i; i < amountCPs; i++)
    {
        if(Streamer_GetIntData(STREAMER_TYPE_CP, i, E_STREAMER_PLAYER_ID) == playerid) DestroyDynamicCP(i);
    }
Are you absolutely sure your looping through all of them?
Assuming CountDynamicCPs returns the last created ID... yes, but thinking about it now that's counter-intuitive. I'll hook CreateDynamicCP and store the lastly created ID and use that as my loops upper bound.
Reply


Messages In This Thread
Streamer CP's aren't destroyed - by Ash. - 13.08.2013, 10:10
Re: Streamer CP's aren't destroyed - by JimmyCh - 13.08.2013, 10:19
Re: Streamer CP's aren't destroyed - by Ash. - 13.08.2013, 10:36
Re: Streamer CP's aren't destroyed - by Pottus - 13.08.2013, 10:42
Re: Streamer CP's aren't destroyed - by Ash. - 13.08.2013, 10:46
Re: Streamer CP's aren't destroyed - by Pottus - 13.08.2013, 11:25
Re: Streamer CP's aren't destroyed - by Ash. - 13.08.2013, 11:29
Re: Streamer CP's aren't destroyed - by Pottus - 13.08.2013, 11:55
Re: Streamer CP's aren't destroyed - by Ash. - 13.08.2013, 11:59
Re: Streamer CP's aren't destroyed - by Pottus - 13.08.2013, 12:08

Forum Jump:


Users browsing this thread: 1 Guest(s)