21.01.2014, 21:14
So idk what it is but when i type my command the motds part wont work not sure it just does nothing when i type it.
Код:
if(strcmp(option1, "motds", true, 5) == 0)
{
if(sscanf(params, "s[32]s[32]", option1, option2))
{
SendClientMessage(playerid, COLOR_WHITE, "** [Usage]: /update motds [option]");
SendClientMessage(playerid, COLOR_GREY, "OPTIONS: motd1, motd2, motd3");
return 1;
}
if(strcmp(option2, "motd1", true, 5) == 0)
{
if(sscanf(params, "s[32]s[32]s[100]", option1, option2, params))
{
SendClientMessage(playerid, COLOR_WHITE, "** [Usage]: /update motds motd1 [text]");
return 1;
}
format(ServerMOTD1, sizeof(ServerMOTD1), "%s", params);
format(string, sizeof(string), "AdmCmd: [motd1]%s has changed the message of the day to %s.", RPN(playerid), params);
SendClientMessageToAll(COLOR_LIGHTRED, string);
format(string, sizeof(string), "%s", params);
TextDrawSetString(MainMenuTxtdraw[6], string);
return 1;
}
if(strcmp(option2, "motd2", true, 5) == 0)
{
if(sscanf(params, "s[32]s[32]i", option1, option2, line))
{
SendClientMessage(playerid, COLOR_WHITE, "** [Usage]: /update motds motd2 [text]");
return 1;
}
format(ServerMOTD2, sizeof(ServerMOTD2), "%s", params);
format(string, sizeof(string), "AdmCmd: [motd2]%s has changed the message of the day to %s.", RPN(playerid), params);
SendClientMessageToAll(COLOR_LIGHTRED, string);
format(string, sizeof(string), "%s", params);
TextDrawSetString(MainMenuTxtdraw[7], string);
return 1;
}
if(strcmp(option2, "motd3", true, 5) == 0)
{
if(sscanf(params, "s[32]s[32]i", option1, option2, line))
{
SendClientMessage(playerid, COLOR_WHITE, "** [Usage]: /update motds motd3 [text]");
return 1;
}
format(ServerMOTD3, sizeof(ServerMOTD3), "%s", params);
format(string, sizeof(string), "AdmCmd: [motd3]%s has changed the message of the day to %s.", RPN(playerid), params);
SendClientMessageToAll(COLOR_LIGHTRED, string);
format(string, sizeof(string), "%s", params);
TextDrawSetString(MainMenuTxtdraw[8], string);
return 1;
}

