28.05.2015, 18:48
Hello, I am working on a temp-ban system and a better way to determine if it is time to be unmuted/unjailed.
I was wondering if I could just use gettime and set it as a string, for example...
Surely this is wrong, how would I do this?
I was wondering if I could just use gettime and set it as a string, for example...
pawn Код:
YCMD:mute(playerid,params[],help) {
blablabla, sscanf
SetPVarInt(playa, "Muted", 1);
SetPVarInt(playa, "MuteTime", gettime()+(hours*3600)); // Would this work?
}
// later on
timer MuteJailTimer[60 * 1000]() {
foreach(Player, i) {
if(GetPVarInt(i, "Muted") > 0) {
new time = GetPVarString(i, "MuteTime");
if(gettime() > time) SetPVarInt(i, "Muted", 0);
}
}
}