Help with Command needed
#1

hello

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;
}
the Varialbe should be set to 0 when the Timer is finished. But nothing happens. It should work when the Player is offline
Reply


Messages In This Thread
Help with Command needed - by Flo_White - 06.06.2009, 17:21
Re: Help with Command needed - by yezizhu - 06.06.2009, 23:12
Re: Help with Command needed - by Luka P. - 06.06.2009, 23:35
Re: Help with Command needed - by Flo_White - 07.06.2009, 20:14
Re: Help with Command needed - by Correlli - 07.06.2009, 20:39

Forum Jump:


Users browsing this thread: 1 Guest(s)