Raised This Month: $ Target: $400
 0% 

Need Advise/Suggestions for Plugins


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
pokemonmaster
princess milk
Join Date: Nov 2010
Location: Somewhere in this world
Old 06-24-2012 , 03:26   Re: Need Advise/Suggestions for Plugins
Reply With Quote #3

Code:
public cmd_mreset(id) {     for(new i; i<count; i++)       {           cs_set_user_deaths(players[i], 0)             set_user_frags(players[i], 0)         client_print(0, print_center,"[ADMIN] Score reset on next spawn")     }   }

I suggest making a new variable and then equalling it to the players[i] (create the variable before the loop) as this will prevent the compiler from overflowing (I read it HERE)

Code:
public cmd_mreset(id) {     new players[32], count, player     get_players(players, count, "h")       for(new i; i<count; i++)     {         player = players[i]         set_user_frags(player, 0)         cs_set_user_deaths(player, 0)             client_print(0, print_center,"[ADMIN] Score reset on next spawn")   // Why the index is 0 if you are looping? // it will show you the message many times as the number of players // if you just put the index to player it will print to all players // as you are collecting all (Dead+alive) from get_players()     } }

Also this
Spoiler
__________________
اَشْهَدُ اَنْ لَّآ اِلٰهَ اِلَّا اللہُ وَحْدَه لَا شَرِيْكَ لَه وَ اَشْهَدُ اَنَّ مُحَمَّدًا عَبْدُه وَرَسُوْلُه
No longer active in AMXX. Sorry.

Last edited by pokemonmaster; 06-24-2012 at 03:59.
pokemonmaster is offline
 



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:18.


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