[URGENT] How to print to all rcon admins? - Micko9 - 11.06.2010
You know the SA-MP Rcon Console? well how to print to it? for (new i=500; i<MAX_RCON_ADMINS; i++) or what?
Re: [URGENT] How to print to all rcon admins? -
(.Aztec); - 11.06.2010
Quote:
Originally Posted by Micko9
You know the SA-MP Rcon Console? well how to print to it? for (new i=500; i<MAX_RCON_ADMINS; i++) or what?
|
If you want to send a message without strings directly to the console:
If you want to send a message with strings directly to the console:
pawn Код:
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "Hi there, %s!", pName);
printf(string);
Re: [URGENT] How to print to all rcon admins? -
NiiRV4N4 - 11.06.2010
Quote:
Originally Posted by Sky4D
Quote:
Originally Posted by Micko9
You know the SA-MP Rcon Console? well how to print to it? for (new i=500; i<MAX_RCON_ADMINS; i++) or what?
|
If you want to send a message without strings directly to the console:
If you want to send a message with strings directly to the console:
pawn Код:
new pName[MAX_PLAYER_NAME]; GetPlayerName(playerid, pName, sizeof(pName)); format(string, sizeof(string), "Hi there, %s!", pName); printf(string);
|
Hey, I know you, you're Tom Collins
Re: [URGENT] How to print to all rcon admins? -
(.Aztec); - 11.06.2010
Quote:
Originally Posted by NiiRV4N4
Quote:
Originally Posted by Sky4D
Quote:
Originally Posted by Micko9
You know the SA-MP Rcon Console? well how to print to it? for (new i=500; i<MAX_RCON_ADMINS; i++) or what?
|
If you want to send a message without strings directly to the console:
If you want to send a message with strings directly to the console:
pawn Код:
new pName[MAX_PLAYER_NAME]; GetPlayerName(playerid, pName, sizeof(pName)); format(string, sizeof(string), "Hi there, %s!", pName); printf(string);
|
Hey, I know you, you're Tom Collins
|
That I am. Now, don't post that here, PM me if you want to talk to me.
Re: [URGENT] How to print to all rcon admins? -
Jefff - 11.06.2010
Works only in FS
pawn Код:
public OnRconCommand(cmd[])
{
if(!strcmp(cmd,"admins",true,6)) {
new Nick[24],bool:Online;
print("Admins OnLine:");
for(new i,g=GetMaxPlayers(); i < g; i++) if(IsPlayerConnected(i) && IsPlayerAdmin(i))
{
GetPlayerName(i,Nick,24);
printf("%s (ID: %d)",Nick,i);
Online=true;
}
if(!Online) print("* No Admins OnLine");
return 1;
}
return 0;
}
Re: [URGENT] How to print to all rcon admins? - Micko9 - 12.06.2010
rofl you all don't understand.
those [part] messages in the console. i Meant the Client RCON Console. Not the server console.
Re: [URGENT] How to print to all rcon admins? -
DJDhan - 12.06.2010
This should work.
Код:
public OnRconCommand(cmd[])
{
if(!strcmp(cmd,"admins",true,6))
{
new Nick[24]; new count;
SendRconCommand("echo Admins OnLine:");
for(new i,g=GetMaxPlayers(); i < g; i++)
if(IsPlayerConnected(i) && IsPlayerAdmin(i))
{
GetPlayerName(i,Nick,24);
SendRconCommand("echo %s (ID: %d)",Nick,i);
count++;
}
if(count==0) SendRconCommand("echo No Admins Online");
return 1;
}
return 0;
}
Re: [URGENT] How to print to all rcon admins? - Micko9 - 17.06.2010
Is anyone actuallly LISTENING
i want to print to the Console (rcon.exe) not the freaking server console, i do not want to count the admins and print them. Does anyone here understand what i am talking about?
Re: [URGENT] How to print to all rcon admins? -
Infinity - 17.06.2010
Well, it's kinda hard because you don't tell us what you want...
Re: [URGENT] How to print to all rcon admins? -
Jay_ - 17.06.2010
You're not explaining clearly enough - rcon.exe: what's that? If you want to send a message to the console use the print function.
Quote:
Originally Posted by Sky4D
If you want to send a message without strings directly to the console:
[...]
If you want to send a message with strings directly to the console:
[...]
|
A string is not a function paramerter. Simply put, a string is a word. Instead of formatting a string and using the print function, you can simply use printf with the values representing the format. For example:
Код:
printf("The value of players is %d.", players);