PHP Code:
public msgHealth(msgid, dest, id)
{
if(!g_isAlive[id])
return PLUGIN_CONTINUE;
static hp;
hp = get_msg_arg_int(1);
if(hp > 255 && (hp % 256) == 0)
set_msg_arg_int(1, ARG_BYTE, ++hp);
return PLUGIN_CONTINUE;
}
loose indentation error on line
and
PHP Code:
static player
for (player = 1; player <= g_iMaxPlayers; player++)
{
// Not connected
if (!g_isConnected[player])
continue;
// Remember changed arguments
static changed[5], changedcount // [5] = max LANG_PLAYER occurencies
changedcount = 0
// Replace LANG_PLAYER with player id
for (i = 2; i < argscount; i++)
{
if (getarg(i) == LANG_PLAYER)
{
setarg(i, 0, player)
changed[changedcount] = i
changedcount++
}
}
// Format message for player
vformat(buffer, charsmax(buffer), message, 3)
// Send it
message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, player)
write_byte(player)
write_string(buffer)
message_end()
// Replace back player id's with LANG_PLAYER
for (i = 0; i < changedcount; i++)
setarg(changed[i], 0, LANG_PLAYER)
}
}
// Send to specific target
else
{
// Format message for player
vformat(buffer, charsmax(buffer), message, 3)
// Send it
message_begin(MSG_ONE, g_msgSayText, _, target)
write_byte(target)
write_string(buffer)
message_end()
}
}
loose indentation error on line :
Code:
static changed[5], changedcount // [5] = max LANG_PLAYER occurencies
I am wondering why do i get that? i haven't left any space and i've used amxmodx indenter. any help?
__________________