server updates help
#1

Okay, Let me do my best to explain what I want this to do. I have a command (/updatelist) and I want to make it so it will be in a format like 'Launched - Whatever U have entered' this one would show if a GMX has been done, But if not GMX yet format like this 'Not Launched - Whatever U have entered'

My Code

Код:
CMD:updatelist(playerid, params[])
{
   	if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
	if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /updatelist [text]");
	if(PlayerInfo[playerid][pAdmin] < 1338) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
	if(AntiAdv(playerid, params)) return 1;
	if(strlen(params) > 128) return SendClientMessage(playerid, COLOR_GREY, "Maximum characters limit is 128.");
	if(!aDuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not on Admin Duty.");
	new File: file = fopen("updates.cfg", io_append), string[128];
	format(string, sizeof(string), "%s\r\n", params);
	fwrite(file, string);
	fclose(file);
	format(string, sizeof(string), "AdmWarn: %s has posted updates, use /updates to view it.", RPN(playerid));
	SendClientMessageToAll(COLOR_LIGHTRED, string);
	return 1;
}
Hope I kinda made this clear..
Reply
#2

Anyone please?
Reply
#3

can anyone help me or not?
Reply
#4

Quote:
Originally Posted by MichaelWharton101
Посмотреть сообщение
I want to make it so it will be in a format like 'Launched - Whatever U have entered' this one would show if a GMX has been done, But if not GMX yet format like this 'Not Launched - Whatever U have entered'
I don't get you. Where do you want it to say "Launched..."?
Reply
#5

Okay, I want it so it is like...

When you use /updatelist 'this is a test'
then when someone uses /updates they see something like...
Not Launched - 'this is a test'
But lets say I do /gmx then when server restarts and someone types /updates they see this.
Launched - 'this is a test'

I think I know how to do it... something like this
format(string, sizeof(string), "%s - %s\r\n", GMXtext, params);
as of now it is
format(string, sizeof(string), "%s\r\n", params);
If I am not wrong for the GMXtext it should be in something like this
stock GMXtext(playerid)
{
What ever would be here to know if a GMX has happen since I had added the updates
}


Please Please please help me
Reply
#6

anyone at all please?
Reply
#7

Quote:
Originally Posted by MichaelWharton101
Посмотреть сообщение
But lets say I do /gmx then when server restarts and someone types /updates they see this.
Launched - 'this is a test'
when the server restard impossible
Reply
#8

Yes it is possible, I have seen it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)