PDA

View Full Version : not showing names


DerickClark
23/03/2013, 01:48 AM
not showing names
// This function sends the given text to all admins
SendAdminText(playerid, command[], text[])
{
// Setup local variables
new Name[24], Msg[128];

// Loop through all players
for (new i; i < MAX_PLAYERS; i++)
{
// Check if the player is an admin
if (APlayerData[i][PlayerLevel] > 0)
{
// Get the player's name
GetPlayerName(playerid, Name, sizeof(Name));
// Send the given text to the admin
format(Msg, 128, "{33ff00}%s used: %s %s", Name, command, text);
SendClientMessage(i, 0xAA3333AA, Msg);
}
}

// Also log all used commands in the server.log file
format(Msg, 128, "%s used: %s %s", Name, command, text);
print(Msg);
}

kamzaf
23/03/2013, 02:04 AM
// This function sends the given text to all admins
SendAdminText(playerid, command[], text[])
{
// Setup local variables
new Name[24], Msg[128];
// Get the player's name
GetPlayerName(playerid, Name, sizeof(Name));
// Loop through all players
for (new i; i < MAX_PLAYERS; i++)
{
// Check if the player is an admin
if (APlayerData[i][PlayerLevel] > 0)
{
// Send the given text to the admin
format(Msg, 128, "{33ff00}%s used: %s %s", Name, command, text);
SendClientMessage(i, 0xAA3333AA, Msg);
}
}

// Also log all used commands in the server.log file
format(Msg, 128, "%s used: %s %s", Name, command, text);
print(Msg);
}

that should work

DerickClark
23/03/2013, 02:08 AM
thanks.