{
entno = stof(argv(1));
- if((entno < 1) | (entno > maxclients)) {
+ if((entno < 0) | (entno > maxclients)) {
print("Player ", argv(1), " doesn't exist\n");
return;
}
- client = edict_num(entno);
-
- if(client.flags & FL_CLIENT)
+ n = 0;
+ for(i = (entno ? entno : 1); i <= (entno ? entno : maxclients); ++i)
{
- if(argc == 4)
- {
- s = argv(2);
- s = strreplace(s, "\n", "");
- s = strreplace(s, "\\", "\\\\");
- s = strreplace(s, "$", "$$");
- s = strreplace(s, "\"", "\\\"");
- stuffcmd(client, sprintf("\ninfobar %f \"%s\"\n", stof(argv(3)), s));
- }
- else
+ client = edict_num(i);
+ if(client.flags & FL_CLIENT)
{
- centerprint_atprio(client, CENTERPRIO_ADMIN, strcat("^3", admin_name(), ":\n\n^7", argv(2)));
- sprint(client, strcat("\{1}\{13}^3", admin_name(), "^7: ", argv(2), "\n"));
+ if(argc == 4)
+ {
+ s = argv(2);
+ s = strreplace(s, "\n", "");
+ s = strreplace(s, "\\", "\\\\");
+ s = strreplace(s, "$", "$$");
+ s = strreplace(s, "\"", "\\\"");
+ stuffcmd(client, sprintf("\ninfobar %f \"%s\"\n", stof(argv(3)), s));
+ }
+ else
+ {
+ centerprint_atprio(client, CENTERPRIO_ADMIN, strcat("^3", admin_name(), ":\n\n^7", argv(2)));
+ sprint(client, strcat("\{1}\{13}^3", admin_name(), "^7: ", argv(2), "\n"));
+ }
+ print("Message sent to ", client.netname, "\n");
+ ++n;
}
- print("Message sent to ", client.netname, "\n");
}
- else
+ if(!n)
print("Client not found\n");
return;