To make the VIP icon have the same duration as the player's VIP status and keep counting even when the player is offline waffle game, you can modify your script to use a permanent timer that updates the VIP status icon. Here's an updated version of your script:
• script Vip_Icon -1,{
OnPCLoginEvent:
bonus_script_clear EFST_VIPSTATE;
if (vip_status(1)) {
set .@timer, vip_status(VIP_STATUS_EXPIRE);
// Set the VIP status icon with the remaining time
bonus_script "{ bonus bAllStats, 1; }", .@timer, 0, 0, EFST_VIPSTATE;
dispbottom "--- VIP ----";
dispbottom "==========================";
dispbottom "Jogador VIP";
dispbottom "Duração do VIP restante :" + callfunc("Time2Str", .@timer);
dispbottom "==========================";
end;
}
}
function script Time2Str {
set .@time, getarg(0);
set .@days, .@time / 86400;
set .@hours, (.@time % 86400) / 3600;
set .@minutes, (.@time % 3600) / 60;
set .@seconds, .@time % 60;
return .@days + "d " + .@hours + "h " + .@minutes + "m " + .@seconds + "s";
}