Hey there,
I added a small "reset" and "master reset" function in my plugin that resets user deaths and frags,
Reset system is working,Changing the deaths and frags to zero;
PHP Code:
public cmd_reset(id)
{
cs_set_user_deaths(id, 0)
set_user_frags(id, 0)
}
But,"Master Reset" is not working;
PHP Code:
public cmd_mreset(id)
{
cs_set_user_deaths(0, 0)
set_user_frags(0, 0)
}
I thought that changing the index to zero means every player

but its not working and giving console errors
- L 06/21/2012 - 23:15
8: [CSTRIKE] Player out of range (0)
- L 06/21/2012 - 23:15
8: [AMXX] Run time error 10: native error (native "cs_set_user_deaths")
I know these errors are because of that O zero index,But I don't know how to do trigger it for all players.
Note: Master Reset will be used by admins,I will add admins checks later on.
__________________