saving player time and weather
#3

Yeah everything is set, but I get a warning from your code, which is

Код:
warning 202: number of arguments does not match definition
line:

Код:
pInfo[playerid][Time] = SetPlayerTime(playerid, 1);
EDIT: the command is working fine. Just take a look if you need to know whats happening there


Код:
CMD:settime(playerid, params[])
{
	if(connected[playerid] == true) return GameTextForPlayer(playerid, "~r~Spawn First", 5000, 5);
	new str[50], time, query[250];
	if(sscanf(params, "i", time)) return SendClientMessage(playerid, -1, "{c3c3c3}/settime [time]");
	if(time < 0 || time > 50)
	{
		SendClientMessage(playerid, -1, "{c3c3c3}/settime [time]");
		return 1;
	}
	SetPlayerTime(playerid, time, time);
	format(str, sizeof(str), "{c3c3c3}(time) Time set to %d", time);
	SendClientMessage(playerid, -1, str);
 	mysql_format(g_SQL, query, sizeof query, "UPDATE `players` SET `time` = %d WHERE `id` = %d LIMIT 1", time, pInfo[playerid][ID]);
 	mysql_tquery(g_SQL, query);
	return 1;
}
I only need to load the players time which is now stored into my MySQL database throught phpymyadmin using r41-2 version.
Reply


Messages In This Thread
saving player time and weather - by severance - 15.08.2018, 17:10
Re: saving player time and weather - by OMonger - 15.08.2018, 18:56
Re: saving player time and weather - by severance - 15.08.2018, 19:13
Re: saving player time and weather - by OMonger - 15.08.2018, 21:05
Re: saving player time and weather - by severance - 15.08.2018, 21:23
Re: saving player time and weather - by OMonger - 15.08.2018, 21:29
Re: saving player time and weather - by severance - 16.08.2018, 10:54

Forum Jump:


Users browsing this thread: 1 Guest(s)