Raised This Month: $ Target: $400
 0% 

Master Reset


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Waleed
Senior Member
Join Date: May 2012
Location: Pakistan
Old 06-21-2012 , 14:37   Master Reset
Reply With Quote #1

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(id0)
    
set_user_frags(id0)


But,"Master Reset" is not working;

PHP Code:
public cmd_mreset(id)
{
    
cs_set_user_deaths(00
    
set_user_frags(00)


I thought that changing the index to zero means every player but its not working and giving console errors

  • L 06/21/2012 - 23:158: [CSTRIKE] Player out of range (0)
  • L 06/21/2012 - 23:158: [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.
__________________
Working On:
  1. Gameplay 1 - 0% [PAUSED]
Waleed is offline
Send a message via Skype™ to Waleed
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:14.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode