Resolvido -
PiLoTo - 06.07.2014
Resolvido
Re: [ADMIN] Na frente do nome do player -
darkxdll - 06.07.2014
PHP код:
//OnPlayerText :
if(VarAdmin[playerid] > 0)
{
new str[128];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
format(str,128,"[ADMIN][%s]:%s",pName,text);
SendClientMessageToAll(-1,str);
return 0;
}
Tente assim ^^
Re: [ADMIN] Na frente do nome do player -
PiLoTo - 06.07.2014
deu 4 Erros
error 001: expected token: ";", but found "]"
fatal error 107: too many error messages on one line
error 029: invalid expression, assumed zero
error 017: undefined symbol "VarAdmin"
Re: [ADMIN] Na frente do nome do player -
darkxdll - 06.07.2014
Cara , mude VarAdmin para sua variavel de ADMIN .
SIMPLES VEI , SIMPLES --'
Re: [ADMIN] Na frente do nome do player -
PiLoTo - 06.07.2014
Cara, MUDE VarAdmin parбgrafo SUA variavel de ADMIN.
SIMPLES VEI, SIMPLES - '
----------------------------------------------------------------------
como vejo a minha variavel
Re: [ADMIN] Na frente do nome do player -
darkxdll - 06.07.2014
Me manda um comando de admin seu .
Re: [ADMIN] Na frente do nome do player -
PiLoTo - 06.07.2014
COMMAND:admins(playerid, params[])
{
// Setup local variables
new AdminList[500], Name[24];
// Send the command to all admins so they can see it
SendAdminText(playerid, "/admins", params);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Scan through all players
for (new i; i < MAX_PLAYERS; i++)
{
// Check if this player is connected
if (IsPlayerConnected(i))
{
// Get the name of the player
GetPlayerName(i, Name, sizeof(Name));
// Check if this player is an RCON admin
if (IsPlayerAdmin(i))
{
// Add all admin players to the list
format(AdminList, 500, "%s%s: %s (ID: %i), Nivel: %i (Scripter/Dono TOM)\n", AdminList, AdminLevelName[APlayerData[i][PlayerLevel]], Name, i, APlayerData[i][PlayerLevel]); // Add the name of the admin-player to the list
// Re-start the for loop (skipping the remaining code for this iteration)
continue;
}
//Check if that player is an admin (using the PlayerLevel)
if (APlayerData[i][PlayerLevel] > 0)
{
// Add all admin players to the list
format(AdminList, 500, "%s%s: %s (id: %i), level-Admin: %i\n", AdminList, AdminLevelName[APlayerData[i][PlayerLevel]], Name, i, APlayerData[i][PlayerLevel]); // Add the name of the admin-player to the list
}
}
}
// Check if there were admin-names added to the list
if (strlen(AdminList) > 0)
ShowPlayerDialog(playerid, DialogNoResponse, DIALOG_STYLE_LIST, "Admins Online:", AdminList, "OK", "Cancel");
else
SendClientMessage(playerid, 0xFF0000FF, "Nao tem Admins online"); // No admins are online
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}
Re: [ADMIN] Na frente do nome do player -
darkxdll - 06.07.2014
usa
PHP код:
if(IsPlayerAdmin(playerid))
Loga na rcon pra aparecer .
Re: [ADMIN] Na frente do nome do player -
PiLoTo - 06.07.2014
colokei issu
if(IsPlayerAdmin(playerid))
{
new str[128];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
format(str,128,"[ADMIN][%s]:%s",pName,text);
SendClientMessageToAll(-1,str);
return 0;
}
fui no sv loguei na rcon e nao apareceu [ADMIN] ''-''
Re: [ADMIN] Na frente do nome do player -
darkxdll - 06.07.2014
Colocou no local certo ? Como estб sua public OnPlayerText ?