Quote:
Originally Posted by m0v3
Yeach , this is true if I want to get hitzones of a specific player to a specific player. But even the get_user_hitzones description tells : Why doesn't that work ? I know I can loop through all the players , and in Exolent[jNr]'s way I'll get what bodyparts client can hit on each of playing users. But if all the results are the same as I can have set
PHP Code:
set_user_hitzones( client , 0 , 4 )
, then it would be better for me just to get if I have set the hitzones specific , or they are default. Your solution is much longer than just one command, so I'm wondering why it isn't working , if description tells it should ?
|
If you used set_user_hitzones( client, 0, ( hitzones ) ), then you can still use my code.
You still have to supply a target to get_user_hitzones( ) because it checks if it is a player.
Code:
public MyFunction( client )
{
new iHitzones;
for( new iTarget = 1; iTarget <= g_iMaxPlayers; iTarget++ )
{
if( is_user_connected( iTarget ) )
{
iHitzones = get_user_hitzones( client, iTarget );
break;
}
}
// iHitzones = body parts where client can hit other players
// Note: This is only true for all targets IF you used 0 as target in set_user_hitzones( )
}
__________________