Launched/GMX with /updates help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Launched/GMX with /updates help (
/showthread.php?tid=434379)
Launched/GMX with /updates help -
MichaelWharton101 - 02.05.2013
Hello, So I have seen this cool thing on a server. What it does is if there was updates added to the server you would do like /updatelist [texthere] then when you do /updates it shows it and it would be like this... No GMX yet - GMX - Texthere. If there was a GMX like this - Launched - texthere. do not tell me this is not possible as I have seen it.
Code for my /updatelist and /updates.
Код:
CMD:updates(playerid, params[])
{
// Calculating
new Year, Month, Day;
getdate(Year, Month, Day);
{
new ActualDay;
PlayerInfo[playerid][pIDay] = ActualDay;
PlayerInfo[playerid][pIMonth] = Month;
PlayerInfo[playerid][pIDay] = Day;
PlayerInfo[playerid][pIMonth] = Month;
PlayerInfo[playerid][pIYear] = Year;
}
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
new string[128], File: file = fopen("updates.cfg", io_read), idx=1;
format(string, sizeof(string), "American Roleplay - Updates until %d/%d/%d", PlayerInfo[playerid][pIMonth], PlayerInfo[playerid][pIDay], PlayerInfo[playerid][pIYear]);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
while(fread(file, string))
{
format(string, sizeof(string), "{00FF00}%d) {FF6347}%s.", idx, string);
SendClientMessage(playerid, COLOR_WHITE, string);
idx ++;
}
fclose(file);
return 1;
}
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;
}
What I am talking about....
Now say there was a GMX it would change the gmx text to launched
Re: Launched/GMX with /updates help -
MichaelWharton101 - 02.05.2013
anyone know how?
Re: Launched/GMX with /updates help -
MichaelWharton101 - 06.05.2013
Still nobody can help me on this?
Re: Launched/GMX with /updates help -
MichaelWharton101 - 20.05.2013
Okay, It has been a while... anyone... please!!!
Re: Launched/GMX with /updates help -
MichaelWharton101 - 23.05.2013
Hello... I am still trying to get help