viewing paste Unknown #19512 | C

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
ACMD(color) {
        int color = 0;
 
        if(!message || !*message || (sscanf_s(message, "%x", &color))) {
                clif->message(fd, "Usage: @color <HEX_COLOR>");
                return false;
        }
       
        if (color > 0xFFFFFF || color < 0) color = 0;
 
        pc_setglobalreg(sd, script->add_str("CHAT_COLOR$"), color);
        sprintf(atcmd_output,"Color has been set to %06x", color);
        clif->message(fd, atcmd_output);
        return true;
}
Viewed 341 times, submitted by unknown.