Raised This Month: $ Target: $400
 0% 

Questions about "for" loop


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ghost95v
Senior Member
Join Date: Apr 2014
Location: somewhere in universe
Old 11-06-2014 , 01:36   Re: Questions about "for" loop
Reply With Quote #1

should i "break" somewhere the loop here ?. ( this is blocking some items for others after 1 user bought one time in 1 map )

PHP Code:
else  if (itemid == g_survivor)
        {
            if(
has_mod[player])
            {
                
chat_color(player"!g[StreetZM]!y You !galready have bought !ymod in this map!")
                return 
ZP_PLUGIN_HANDLED;
            }
            if(
has_survivor[player])
            {
            
chat_color(player"!g[ZP]!y It!g was a Survivor!y in this map!")
            return 
ZP_PLUGIN_HANDLED;
            }
            
zp_make_user_survivor(player)
            
has_mod[player] = true
            
for (player 1player <= g_maxplayersplayer++)
            {
            
has_survivor[player] = true
            
}
        }
else  if (
itemid == g_sniper)
        {
            if(
has_mod[player])
            {
                
chat_color(player"!g[StreetZM]!y You !galready have bought !ymod in this map!")
                return 
ZP_PLUGIN_HANDLED;
            }
            if(
has_sniper[player])
            {
            
chat_color(player"!g[StreetZM]!y You !galready have bought mod !yin this map!")
            return 
ZP_PLUGIN_HANDLED;
            }
            
zp_make_user_sniper(player)
            
has_mod[player] = true
            
for (player 1player <= g_maxplayersplayer++)
            {
            
has_sniper[player] = true
            
}
        }
        
g_buyable false    
        
return PLUGIN_CONTINUE

__________________

Last edited by ghost95v; 11-06-2014 at 01:39.
ghost95v is offline
Send a message via Skype™ to ghost95v
Reply



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 17:38.


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