dcmd_announce(playerid, params[])
{
new message;
new string[128];
new string2[128];
if(PlayerInfo[playerid][AdminLevel] < LEVEL_ANNOUNCE) ErrorMessage(playerid, "Error: You don't have a high enough admin level!");
else if (sscanf(params, "s", message)) ErrorMessage(playerid, "Usage: '/announce [text]'");
else
{
format(string, sizeof(string), "~n~~w~%s", message);
GameTextForAll(string, 4000, 3);
format(string2, sizeof(string2), "Administrator %s has announced this: %s", PlayerName(playerid), message);
printf(string2);
}
return 1;
}
dcmd_announce(playerid, params[])
{
new message[128];
new string[128];
if(PlayerInfo[playerid][AdminLevel] < LEVEL_ANNOUNCE) ErrorMessage(playerid, "Error: You don't have a high enough admin level!");
else if (sscanf(params, "s", message)) ErrorMessage(playerid, "Usage: '/announce [text]'");
else
{
format(string, sizeof(string), "~n~~w~%s", message);
GameTextForAll(string, 4000, 3);
format(string, sizeof(string), "Administrator %s has announced this: %s", PlayerName(playerid), message);
printf(string);
}
return 1;
}
|
Originally Posted by ray187
Код:
new message[128; |
new message[128];