Heres how i register it:
PHP Code:
register_logevent("cmdRescuedHostage", 3, "1=Rescued_A_Hostage");
If its right, here is the code:
PHP Code:
public cmdRescuedHostage() {
new id = get_loguser_index();
if (get_playersnum(1) >= 2) {
new iPoints = get_pcvar_num(gCvarRescuedHostagePoints);
gPlayerPoints[id] += iPoints;
ColorChat(id, GREEN, "%s^x01 You got^x03 %d^x01 points for rescuing a hostage", PREFIX, iPoints);
}
}
}
And here is get_loguser_index:
PHP Code:
stock get_loguser_index() {
new loguser[80], name[32];
read_logargv(0, loguser, 79);
parse_loguser(loguser, name, 31);
return get_user_index(name);
}