11.06.2010, 22:20
You know the SA-MP Rcon Console? well how to print to it? for (new i=500; i<MAX_RCON_ADMINS; i++) or what?
|
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?
|
print("message");
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "Hi there, %s!", pName);
printf(string);
|
Originally Posted by Sky4D
Quote:
pawn Код:
pawn Код:
|
|
Originally Posted by NiiRV4N4
Quote:
|
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;
}
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;
}
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?
|
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: [...] |
printf("The value of players is %d.", players);