06.06.2009, 17:21
hello
i don't know why this won't work, perhaps you can help me:
the Varialbe should be set to 0 when the Timer is finished. But nothing happens. It should work when the Player is offline
i don't know why this won't work, perhaps you can help me:
Код:
forward cmdupdate(wert,wertin[],oname[21]);
dcmd_command(playerid, params[])
{
if(PlayerData[playerid][Level] >= 2)
{
new opfer,time,reason[128],oname[MAX_PLAYER_NAME];
if(sscanf(params,"uds",opfer,time,reason)) return SendClientMessage(playerid, COLOR_SYSTEM, "Usage: /command [playerid] [hours] [reason]");
GetPlayerName(opfer,oname,sizeof(oname));
format(string,sizeof(string),"/fAdmin/Users/%s.ini",oname);
dini_IntSet(string,"Variable",time);
SetTimerEx("timebanupdate",time*60,0,"dss",0,"a",oname);
return 1;
}
else return SendClientMessage(playerid,COLOR_RED,"Admins only!");
}
public cmdupdate(wert,wertin[],oname[21])
{
format(oname,sizeof(oname),"/fAdmin/Users/%s.ini",oname);
if(fexist(oname))
{
dini_IntSet(oname,"Variable",0);
}
return 1;
}

