[Ajuda] Oq eu coloco aki para aparecer |adm| no nome da pessoa ?
#1

Quote:

COMMAND:daradmin(playerid, params[])
{
// Setup local variables
new OtherPlayer, Level, Msg[128], Name[24], AdminName[24], OldLevel;

// Send the command to all admins so they can see it
SendAdminText(playerid, "/daradm", params);

// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Check if the player's admin-level is at least 5
if (APlayerData[playerid][PlayerLevel] >= 5)
{
if (sscanf(params, "ui", OtherPlayer, Level)) SendClientMessage(playerid, 0xFF0000AA, "Digite: \"/daradm <Player> <AdminLevel>\"");
else
{
// Check if that other player is online
if (IsPlayerConnected(OtherPlayer))
{
// Get the old level of the other player
OldLevel = APlayerData[OtherPlayer][PlayerLevel];
// Get the playername of the admin
GetPlayerName(playerid, AdminName, sizeof(AdminName));
// Also get the name of the player that has been promoted
GetPlayerName(OtherPlayer, Name, sizeof(Name));
// Store the level of the player
APlayerData[OtherPlayer][PlayerLevel] = Level;
// Let all players know about it
if (OldLevel != Level)
{
// Check if the player has been promoted or demoted
if (OldLevel < Level)
format(Msg, 128, "{00FF00}-|O Player {FFFFFF}%s {00FF00}Foi Promovido a {FFFFFF}%s {00FF00}por {FFFFFF}%s{00FF00}|-", Name, AdminLevelName[Level], AdminName);
if (OldLevel > Level)
format(Msg, 128, "{FF0000}-|O Player{FFFFFF} %s {FF0000}Foi Rebaixado a {FFFFFF}%s por {FFFFFF}%s{FF0000}|-", Name, AdminLevelName[Level], AdminName);
SendClientMessageToAll(0x00FFFFFF, Msg);
}
else
SendClientMessage(playerid, 0xFF0000FF, "O Level de outro Jogador nao Foi Alterado");
}
else
SendClientMessage(playerid, 0xFF0000FF, "O Player nao esta Online");
}
}
else
return 0;
}
else
return 0;

// Let the server know that this was a valid command
return 1;
}

й que eu quero logar como adm ,so q sem usar o rcon ,eu ja usei o /daradm mais nn aparece o meu nome com o adm depois,eu quero descubrir como coloco o adm depois do meu nome,entendeu ?
Reply
#2

OnPlayerText

Eles acrescentam a palavra Admin no seu texto , mas nгo muda seu nick.
Reply
#3

eu nn achei o onplayertext ,onde q ta no meu texto,me da uma referencia
Reply
#4

procura no gm
Reply
#5

Quote:

public OnPlayerText(playerid, text[])
{
if(APlayerData[playerid][PlayerName])
{
new textv2[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof (name));
format(textv2, sizeof (textv2), " %s [ID:%d]:{FFFFFF} %s", name, playerid, text);
SendClientMessageToAll(GetPlayerColor(playerid),te xtv2);
return 0;
}

й esse,se for oq devo alterar ?
Reply
#6

sim й extamente isso ^^
Reply
#7

mais oq devo alterar para aparecer admin so no meu nome
Reply
#8

pawn Код:
format(textv2, sizeof (textv2), " %s [ID:%d]:{FFFFFF} %s", name, playerid, text);
ai vc poe assim

pawn Код:
format(textv2, sizeof (textv2), "|ADM| %s [ID:%d]:{FFFFFF} %s", name, playerid, text);
Reply
#9

mais ai vai aparecer so no meu nome ou nos das outras pessoas tbm ?
Reply
#10

ai vai aparece no nome de todo mundo
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)