13.12.2012, 21:29
Quote:
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. |
pawn Код:
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;
}