server updates help -
MichaelWharton101 - 11.04.2013
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..
Re: server updates help -
MichaelWharton101 - 11.04.2013
Anyone please?
Re: server updates help -
MichaelWharton101 - 12.04.2013
can anyone help me or not?
Re: server updates help -
[KHK]Khalid - 12.04.2013
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..."?
Re: server updates help -
MichaelWharton101 - 12.04.2013
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
Re: server updates help -
MichaelWharton101 - 16.04.2013
anyone at all please?
Re : Re: server updates help -
DaTa[X] - 16.04.2013
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
Re: server updates help -
MichaelWharton101 - 16.04.2013
Yes it is possible, I have seen it.