Timeban Command Won't Work
#1

Hello, i have 2 errors in my command and i don't know how to fix it, please help me:

Код:
CMD:timeban(playerid,params[])
{
			new targetid,days,reason[105],string[256];
			if(sscanf(params, "uis[105]", targetid,days,reason)) return SendClientMessage(playerid,-1,""chat" /timeban [playerid] [day] [reason]");
			if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online.");

			format(string, sizeof(string),""chat""COL_RED" %s %s has banned %s [Reason: %s]",GetAdminName(playerid),PlayerName(playerid),PlayerName(targetid),days,reason);
			SendClientMessageToAll(-1,string);

			new totaltime = gettime()+86400*days;
			BanPlayer(targetid,reason,PlayerName(playerid),totaltime);
		}
	return 1;
}
number of arguments does not match definition at line: "BanPlayer(targetid,reason,PlayerName(playerid),to taltime);"
warning 204: symbol is assigned a value that is never used: "totaltime" at line: "new totaltime = gettime()+86400*days;"
Reply
#2

BanPlayer is something you created? Like custom stock?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)