16.11.2012, 21:40
AttachPlayerObjectToPlayer doesn't work, its a native yes but it doesn't work..
I know we have "GetPlayerVisibleDynamicRaceCP" - But what about multiple race CP's that a player has streamed?
There is no function to delete all the streamed CPs for player race CPs. |
No need. Just Use SelectObject, and OnPlayerSelectDynamicObject will be called if you select an object that's handled by the streamer.
|
pawno\include\streamer.inc(155) : error 017: undefined symbol "OBJECT_MATERIAL_SIZE_256x128"
include\streamer.inc(375) : warning 235: public function lacks forward declaration (symbol "OnPlayerEditObject")
pawno\include\streamer.inc(397) : warning 235: public function lacks forward declaration (symbol "OnPlayerSelectObject")
pawno\include\streamer.inc(399) : error 017: undefined symbol "SELECT_OBJECT_PLAYER_OBJECT"
Can you make it so you can destroy all player race checkpoints created. Whether they're visible or not. You can only destroy the checkpoints if you let them destroy ALL of them including every player.
I want it so you can destroy all race CPs for certain players. |
stock DestroyAllDynamicRaceCPsEx(playerid)
{
if(playerid == INVALID_PLAYER_ID)
{
DestroyAllDynamicRaceCPs();
}
else
{
new upper_bound = Streamer_GetUpperBound(STREAMER_TYPE_RACE_CP), checkpointid;
for( ; checkpointid < upper_bound; checkpointid++ )
{
if(!IsValidDynamicRaceCP(checkpointid)) continue;
if(Streamer_IsInArrayData(STREAMER_TYPE_RACE_CP , checkpointid, E_STREAMER_PLAYER_ID, playerid))
{
TogglePlayerDynamicRaceCP(playerid, checkpointid, false); // just to make sure it's hidden
Streamer_RemoveArrayData(STREAMER_TYPE_RACE_CP , checkpointid], E_STREAMER_PLAYER_ID, playerid);
}
}
}
return 1;
}
pawn Код:
|
Streamer_DestroyPlayerRaceCPs(playerid) { for (new i = 1, j = Streamer_GetUpperBound(STREAMER_TYPE_RACE_CP); i < j; i++) { if (Streamer_IsInArrayData(STREAMER_TYPE_RACE_CP, i, E_STREAMER_PLAYER_ID, playerid)) { DestroyDynamicRaceCP(i); } } }