[Pedido] Comando
#8

Mensagem fixa para todos os jogadores online:

PHP код:
CMD:cnn2(playeridparams[])
{
    for(new 
0<= MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i))
        {
            
GameTextForPlayer(i"MENSAGEM AQUI"50005);
        }
    }
    return 
1;

Mensagem fixa para um jogador sу pelo id:

PHP код:
CMD:cnn2(playeridparams[])
{
    new 
playerb;
    if(
sscanf(params"u"playerb)) return SendClientMessage(playerid, -1"DICA: Use /cnn2 <ID> para enviar a mensagem ao jogador!");
    if(
IsPlayerConnected(playerb))
    {
        
GameTextForPlayer(playerb"MENSAGEM AQUI"50005);
    }
    return 
1;

Mensagem personalizada para jogador por ID:
PHP код:
stock NomeJogador(playerid)
{
    new 
name[MAX_PLAYER_NAME+1];
    
GetPlayerName(playeridnameMAX_PLAYER_NAME+1);
    return 
name;
}
CMD:cnn2(playeridparams[])
{
    new 
playerbstring[128];
    if(
sscanf(params"us[128]"playerbparams)) return SendClientMessage(playerid, -1"DICA: Use /cnn2 <ID> para enviar a mensagem ao jogador!");
    
format(stringsizeof(string), "%s diz: %s"NomeJogador(playerid), params);
    if(!(
IsPlayerConnected(playerb))) return SendClientMessage(playerid, -1"Este jogador nгo estб conectado!");
    {
        
GameTextForPlayer(playerbstring50005);
    }
    return 
1;


Os comandos nгo foram testados. Caso nгo funcione, responda aqui no tуpico que a gente te ajuda!
Reply


Messages In This Thread
Comando - by Japis - 19.06.2017, 03:02
Re: Comando - by DelK - 19.06.2017, 03:17
Re: Comando - by Japis - 19.06.2017, 10:33
Re: Comando - by CZ - 20.06.2017, 03:51
Re: Comando - by Japis - 20.06.2017, 04:53
Re: Comando - by DelK - 20.06.2017, 10:23
Re: Comando - by Japis - 20.06.2017, 14:44
Re: Comando - by rolex - 20.06.2017, 14:57
Re: Comando - by IlanZ - 20.06.2017, 20:27
Re: Comando - by rolex - 21.06.2017, 03:07

Forum Jump:


Users browsing this thread: 1 Guest(s)