SA-MP Forums Archive
Help with Command needed - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with Command needed (/showthread.php?tid=80836)



Help with Command needed - Flo_White - 06.06.2009

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


Re: Help with Command needed - yezizhu - 06.06.2009

pawn Код:
SetTimerEx ("timebanupdate",time*60,0,"dss",0,"a",oname);
edited to
pawn Код:
SetTimerEx ("timebanupdate",time*60,1,"dss",0,"a",oname);



Re: Help with Command needed - Luka P. - 06.06.2009

SetTimerEx("timebanupdate",time*60,1,"dss",0,"%i", oname); // I don`t know it is work,i don`t know what i change??

I just ask to myself:

What Jesus will do?


Re: Help with Command needed - Flo_White - 07.06.2009

Quote:
Originally Posted by Luka™
SetTimerEx("timebanupdate",time*60,1,"dss",0,"%i", oname); // I don`t know it is work,i don`t know what i change??
ermm what? lol i dont understand anything you wrote


Re: Help with Command needed - Correlli - 07.06.2009

Learn how to use SetTimerEx.

SetTimerEx(funcname[], interval, repeating, const format[], {Float,_}:...);