28/02/2019, 04:13 PM
(Última modificación: 28/02/2019, 08:01 PM por Reverant. Edited 4 times in total.)
Hice una copia de los comando para dar puntos hyz
Código PHP:
// zp_hpoints[target][amount]
public cmd_spoints(id, level, cid)
{
new name[33]
get_user_name(id, name, 32)
// Check for access flag
if (!cmd_access(id, level, cid, 2))
return PLUGIN_HANDLED;
// Retrieve arguments
static arg[32], arg2[6], player, iPoints2
read_argv(1, arg, sizeof arg - 1)
read_argv(2, arg2, sizeof arg2 - 1)
player = cmd_target(id, arg, CMDTARGET_NO_BOTS | CMDTARGET_ALLOW_SELF)
// Invalid target
if (!player) return PLUGIN_HANDLED;
// Increase Points
iPoints2 = (str_to_num(arg2))
zp_colored_print(id, "^x04[DIVITS]^x01 Le sumaste^x04 %d divits SNIPER^x01 a^x04 %s^x01.", iPoints2, arg)
zp_colored_print(player, "^x04[DIVITS]^x01 Te sumaron^x04 %d divits SNIPER^x01.^x04 GRACIAS POR TU COLABORACION", iPoints2)
//ESTE g_skill_sya[player][0] += iPoints2
return PLUGIN_HANDLED;
}
// zp_zpoints [target][amount]
public cmd_apoints(id, level, cid)
{
new name[33]
get_user_name(id, name, 32)
// Check for access flag
if (!cmd_access(id, level, cid, 2))
return PLUGIN_HANDLED;
// Retrieve arguments
static arg[32], arg2[6], player, iPoints
read_argv(1, arg, sizeof arg - 1)
read_argv(2, arg2, sizeof arg2 - 1)
player = cmd_target(id, arg, CMDTARGET_NO_BOTS | CMDTARGET_ALLOW_SELF)
// Invalid target
if (!player) return PLUGIN_HANDLED;
// Increase Points
iPoints = (str_to_num(arg2))
zp_colored_print(id, "^x04[DIVITS]^x01 Le sumaste^x04 %d divits ASSASSIN^x01 a^x04 %s^x01.", iPoints, arg)
zp_colored_print(player, "^x04[DIVITS]^x01 Te sumaron^x04 %d divits ASSASSIN^x01.^x04 GRACIAS POR TU COLABORACION", iPoints )
//ESTE g_skill_sya[player][1] += iPoints
return PLUGIN_HANDLED;
}
Cita:Error: Array assignment must be simple assignment on line 14140
Warning: Expression has no effect on line 14140
Error: Array assignment must be simple assignment on line 14169
Warning: Expression has no effect on line 14169