CMD:tapa(playerid, params[])
{
static xRL[144], NomeDoAdm[40], NomeDoTapado[40], Float:X, Float:Y, Float:Z;
if(!xPlayerInfo[playerid][xAdmin]) return SendClientMessage(playerid, xBranco, "{ff0000}» {ffffff}Vocк nгo й um administrador.");
if(isnull(params)) return SendClientMessage(playerid, xBranco, "{ff0000}» {ffffff}Use: /tapa [ID ou Nome].");
if(!IsPlayerConnected(params)) return SendClientMessage(playerid, xBranco, "{ff0000}» {ffffff}Nenhuma pessoa online com esse ID/Nome.");
GetPlayerName(playerid, NomeDoAdm,sizeof(NomeDoAdm));
GetPlayerName(playerid, NomeDoTapado,sizeof(NomeDoTapado));
format(xRL,sizeof(xRL), "Vocк deu um tapa no {4294FF}%s{ffffff}.", NomeDoTapado);
SendClientMessage(playerid, xBranco, xRL);
format(xRL,sizeof(xRL), "{858585}[Palomino] {ffffff}O administrador {4294FF}%s {ffffff}lhe deu um tapa.", NomeDoAdm);
SendClientMessage ( strval ( params ), xCinzaEscuro, xRL);
GetPlayerPos(params, X, Y, Z);
SetPlayerInterior(params, GetPlayerInterior(params));
SetPlayerPos(params, X, Y, Z +50);
return true;
}
if(!IsPlayerConnected(params)) return SendClientMessage(playerid, xBranco, "{ff0000}» {ffffff}Nenhuma pessoa online com esse ID/Nome."); GetPlayerPos(params, X, Y, Z); SetPlayerInterior(params, GetPlayerInterior(params)); SetPlayerPos(params, X, Y, Z +50);
CMD:trazer(playerid, params[])
{
static NomePlayer[20], NomeDoAdm[20], xRL[144], Float:X, Float:Y, Float:Z;
if(!xPlayerInfo[playerid][xAdmin]) return SendClientMessage(playerid, xBranco, "{ff0000}» {ffffff}Vocк nгo й um administrador." ) ;
if( isnull ( params ) ) return SendClientMessage(playerid, xBranco, "{ff0000}» {ffffff}Use: /trazer [id]");
GetPlayerName ( playerid, NomeDoAdm, 20 ) ;
GetPlayerName ( strval ( params ), NomePlayer, 20 ) ;
GetPlayerPos ( strval ( playerid ), X, Y, Z ) ;
SetPlayerPos ( params, X, Y, Z ) ;
format ( xRL,sizeof ( xRL ), "{858585}[Palomino] {ffffff} O admin %s, trouxe vocк atй ele.", NomeDoAdm );
SendClientMessage ( strval ( params ), xCinzaEscuro, xRL);
format ( xRL, sizeof ( xRL ), "{858585}[Palomino] {ffffff}Vocк trouxe o player {4294FF}%s", NomePlayer ) ;
SendClientMessage ( playerid, xCinzaEscuro, xRL ) ;
return true;
}
GetPlayerPos ( strval ( playerid ), X, Y, Z ) ; SetPlayerPos ( params, X, Y, Z ) ;
CMD:tapa(playerid, params[])
{
static xRL[144], NomeDoAdm[40], NomeDoTapado[40], Float:X, Float:Y, Float:Z;
if ( !xPlayerInfo[playerid][xAdmin]) return SendClientMessage(playerid, xBranco, "{ff0000}» {ffffff}Vocк nгo й um administrador.");
if ( isnull ( params ) )
return SendClientMessage(playerid, xBranco, "{ff0000}» {ffffff}Use: /tapa [ID ou Nome].");
if(!IsPlayerConnected ( strval ( params ) ) )
return SendClientMessage(playerid, xBranco, "{ff0000}» {ffffff}Nenhuma pessoa online com esse ID/Nome.");
GetPlayerName(playerid, NomeDoAdm,sizeof(NomeDoAdm));
GetPlayerName ( strval ( params ), NomeDoTapado, sizeof ( NomeDoTapado ) ) ;
format(xRL,sizeof(xRL), "Vocк deu um tapa no {4294FF}%s{ffffff}.", NomeDoTapado);
SendClientMessage(playerid, xBranco, xRL);
format(xRL,sizeof(xRL), "{858585}[Palomino] {ffffff}O administrador {4294FF}%s {ffffff}lhe deu um tapa.", NomeDoAdm);
SendClientMessage ( strval ( params ), xCinzaEscuro, xRL);
GetPlayerPos ( strval ( params ), X, Y, Z ) ;
SetPlayerInterior( strval ( params ), GetPlayerInterior ( strval ( params ) ) ) ;
SetPlayerPos ( strval ( params ), X, Y, Z +50);
return true;
}
CMD:trazer(playerid, params[])
{
static NomePlayer[20], NomeDoAdm[20], xRL[144], Float:X, Float:Y, Float:Z;
if(!xPlayerInfo[playerid][xAdmin]) return SendClientMessage(playerid, xBranco, "{ff0000}» {ffffff}Vocк nгo й um administrador." ) ;
if( isnull ( params ) )
return SendClientMessage(playerid, xBranco, "{ff0000}» {ffffff}Use: /trazer [id]");
GetPlayerName ( playerid, NomeDoAdm, 20 ) ;
GetPlayerName ( strval ( params ), NomePlayer, 20 ) ;
GetPlayerPos ( playerid, X, Y, Z ) ;
SetPlayerPos ( strval ( params ), X, Y, Z ) ;
format ( xRL,sizeof ( xRL ), "{858585}[Palomino] {ffffff} O admin %s, trouxe vocк atй ele.", NomeDoAdm );
SendClientMessage ( strval ( params ), xCinzaEscuro, xRL);
format ( xRL, sizeof ( xRL ), "{858585}[Palomino] {ffffff}Vocк trouxe o player {4294FF}%s", NomePlayer ) ;
SendClientMessage ( playerid, xCinzaEscuro, xRL ) ;
return true;
}
CMD:relato(playerid, params[])
{
static xRL[144], xPlayer[40], xAdmins[40];
if( isnull(params) ) return SendClientMessage(playerid, xBranco, "{ff0000}» {ffffff}Use: /relato [Mensagem]");
GetPlayerName(playerid, xPlayer, 40);
format(xRL, sizeof(xRL), "{858585}[Palomino] {ffffff} O relato foi enviado, aguarde um admin.");
SendClientMessage(playerid, xBranco, xRL);
for(new i = 0; i< MAX_PLAYERS; i++)
if(xPlayerInfo[i][xAdmin])
GetPlayerName(i, xAdmins,sizeof(xAdmins));
format(xRL, sizeof(xRL), "{ff0000}[relato] de {2078B3}%s{ffffff}, %s", xPlayer, params);
SendClientMessage(xAdmin, xBranco, xRL);
return 1;
}
Obrigado a todos ae.
Deu certo o comando, +REP a vocкs ( se eu conseguir dar '-' ) Galera podem ajudar nesse /relato tambйm? Tipo eu to tentando fazer para sу os administradores receberem a mensagem mais nгo consigo. PHP код:
|
CMD:relato(playerid, params[])
{
static xRL[144], xPlayer[40], xAdmins[40];
if( isnull(params) ) return SendClientMessage(playerid, xBranco, "{ff0000}» {ffffff}Use: /relato [Mensagem]");
GetPlayerName(playerid, xPlayer, 40);
SendClientMessage(playerid, xBranco, "{858585}[Palomino] {ffffff} O relato foi enviado, aguarde um admin.");
format(xRL, sizeof(xRL), "{ff0000}[relato] de {2078B3}%s{ffffff}, %s", xPlayer, params);
for(new i = 0; i< MAX_PLAYERS; i++)
if(xPlayerInfo[i][xAdmin])
SendClientMessage(i, xBranco, xRL);
return 1;
}
forward xMensagem ( xCor, const xCelulas[], xNivel ) ; public xMensagem ( xCor, const xCelulas[], xNivel )
{
for(new i = 0; i < MAX_PLAYERS; i++)
if ( IsPlayerConnected ( i ) )
if ( xPlayerInfo [ i ] [ xAdmin ] >= xNivel )
SendClientMessage ( i, xCor, xCelulas ) ;
return 1;
}
CMD:relato(playerid, params[])
{
static xRL [ 144 ], xPlayer [ 40 ] ;
if( isnull ( params ) )
return SendClientMessage(playerid, xBranco, "{ff0000}» {ffffff}Use: /relato [Mensagem]");
format(xRL, sizeof(xRL), "{858585}[Palomino] {ffffff} O relato foi enviado, aguarde um admin.");
SendClientMessage(playerid, xBranco, xRL);
for(new i = 0; i < MAX_PLAYERS; i++)
GetPlayerName(playerid, xPlayer, 20) ;
if ( xPlayerInfo [ i ] [ xAdmin ] > 1 )
{
format ( xRL, sizeof ( xRL ), "{ff0000}[relato] de {2078B3}%s{ffffff}, %s", xPlayer, params ) ;
xMensagem ( xBranco, xCelulas, 1 ) ;
}
return 1;
}
CMD:relatar(playerid, params[]){
if(isnull(params))
return SendClientMessage(playerid, -1, "{ff0000}» {ffffff}Use: /relato [Mensagem]");
static
zStr[150],
Names[24]
;
SendClientMessage(playerid, -1, "{858585}[Palomino] {ffffff} O relato foi enviado, aguarde um admin.");
format(zStr, 150, "{ff0000}[relato] de {2078B3}%s{ffffff}, %s", (GetPlayerName(playerid, Names, 24), Names), params);
for(new i, e = GetMaxPlayers(); i != e; ++i){
if(IsPlayerConnected(i)){
if(xPlayerInfo[i][xAdmin] > 0){
SendClientMessage(playerid, -1, zStr);
}
}
}
return true;
}