Quote:
Originally Posted by IstuntmanI
and:
pawn Код:
native GetRandomPlayerInDynamicArea( areaid ); // returns the ID of one of the players in areaid native GetRandomPlayerInAnyDynamicArea( ); // returns the ID of one of the players in any area
native CountPlayersInDynamicArea( areaid ); // returns the number of players in areaid native CountPlayersInAnyDynamicArea( ); // returns the number of players in any area
native GetPlayersInDynamicArea( areaid, players[ ] ); // fills players[ ] with the IDs of all players which are in areaid native GetPlayersInAnyDynamicArea( players[ ] ); // fills players[ ] with the IDs of all players which are in any area
native GetPlayerDynamicAreas( playerid, areas[ ] ); // fills areas[ ] with the IDs of all dynamic areas in which is the player
A bug: IsPlayerInDynamicArea crashes the server with a invalid areaid, I know we should use IsValidDynamicArea, but still, it shouldn't crash the server.
|
I like a few of those suggestions.
IsPlayerInDynamicArea doesn't crash for me. Are you sure you aren't just accessing an array out of bounds in your script? Check what the CrashDetect plugin tells you.