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 = 1; player <= g_maxplayers; player++)
{
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 = 1; player <= g_maxplayers; player++)
{
has_sniper[player] = true
}
}
g_buyable = false
return PLUGIN_CONTINUE
}
__________________