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
#2

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

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?
Reply
#4

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
Reply
#5

Learn how to use SetTimerEx.

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


Forum Jump:


Users browsing this thread: 1 Guest(s)