not stopping return a cmd
#2

You just need to switch the function 'SendClientMessageToAll' with 'SendClientMessage' to the ID (i) because you're using a loop anyway. I've fixed it for you.

Code:
CMD:day(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] <= 2) return SendClientMessage(playerid, COLOR_RED, "ERROR: Insufficient Permissions!");
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		SetPlayerTime(i, 12, 0);
		SendClientMessage(i, COLOR_RED, "Server's time has been set to day time!");
	}
	return 1;
}
Also, I recommend you to remember to indent your codes.
Reply


Messages In This Thread
not stopping return a cmd - by rakinz - 15.11.2017, 19:28
Re: not stopping return a cmd - by Jaxium - 15.11.2017, 19:42
Re: not stopping return a cmd - by TomRedlake - 15.11.2017, 20:41
Re: not stopping return a cmd - by Lucases - 15.11.2017, 20:42
Re: not stopping return a cmd - by Andre02 - 15.11.2017, 20:54
Re: not stopping return a cmd - by Lucases - 15.11.2017, 20:57

Forum Jump:


Users browsing this thread: 1 Guest(s)