[Ajuda] Colocar ID na Mensagem
#1

Queria saber onde coloca na PPC_Trucking pra ficar ex: Nork [ID:0]: eae
Reply
#2

callback OnPlayerText
https://sampwiki.blast.hk/wiki/OnPlayerText
Reply
#3

carб
aki?
PHP код:
public OnPlayerText(playeridtext[])
{
    if (
APlayerData[playerid][Muted] == true)
    {
        
SendClientMessage(playeridVERMELHO"Vocк estб mudo!");
        return 
0;
    }
    return 
1;

se for diz como coloco
Reply
#4

Quote:
Originally Posted by Nork
Посмотреть сообщение
carб
aki?
PHP код:
public OnPlayerText(playeridtext[])
{
    if (
APlayerData[playerid][Muted] == true)
    {
        
SendClientMessage(playeridVERMELHO"Vocк estб mudo!");
        return 
0;
    }
    return 
1;

se for diz como coloco
pawn Код:
public OnPlayerText(playerid, text[])
{
    if (APlayerData[playerid][Muted] == true)
    {
        SendClientMessage(playerid, VERMELHO, "Vocк estб mudo!");
        return 0;
    }
        new textv2[128], name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof (name));
        format(textv2, sizeof (textv2), "%s [ID:%d]: %s", name,playerid, text);
        SendPlayerMessageToAll(playerid, textv2);
    return 0;
}
Reply
#5

C:\Users\Arruda\Desktop\Universo dos Caminhoneiros [GM]\UDC\gamemodes\UDC.pwn(57 : warning 217: loose indentation
C:\Users\Arruda\Desktop\Universo dos Caminhoneiros [GM]\UDC\gamemodes\UDC.pwn(582) : warning 217: loose indentation
C:\Users\Arruda\Desktop\Universo dos Caminhoneiros [GM]\UDC\gamemodes\UDC.pwn(584) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#6

Qual й a linha 584 ? copilei aqui e nгo deu erro.
Reply
#7

й que vocк coloco 2 return 0 tirei e deu so loose coisa facil de arruma agr vo ver se ta pegando.
@edit deu errado o player fala a id quando eu digito algo ele fala a id emcima :C ajudem
Reply
#8

Bom Cara estava com 1 problema no /calar eles continuavam falando mais ja arrumei entao esta aqui uma com id e tudo


PHP код:
public OnPlayerText(playeridtext[])
{
if(
APlayerData[playerid][PlayerLevel] >= 1)
{
new 
textv2[128], name[MAX_PLAYER_NAME];
    
GetPlayerName(playeridnamesizeof (name));
    
format(textv2sizeof (textv2), "[ADMIN] %s [ID:%d]:{FFFFFF} %s"nameplayeridtext);
    
SendClientMessageToAll(GetPlayerColor(playerid),textv2);
    return 
0;
}
// Players ///
if (APlayerData[playerid][Muted] == false)
{
new 
textv2[128], name[MAX_PLAYER_NAME];
    
GetPlayerName(playeridnamesizeof (name));
    
format(textv2sizeof (textv2), "%s [ID:%d]:{FFFFFF} %s"nameplayeridtext);
    
SendClientMessageToAll(GetPlayerColor(playerid),textv2);
    return 
0;
}
    
// Block the player's text if he has been muted
    
if (APlayerData[playerid][Muted] == true)
    {
        
SendClientMessage(playerid0xFFFFFFFF"Vocк estб mudo e nгo pode Falar!");
        return 
0;
    }
    return 
1;

Reply
#9

Aqui o cуdigo pronto

Ajudei? + Rep

PHP код:

public OnPlayerTextplayeridtext [ ] )
{
    if(
APlayerDataplayerid ][ Muted ] == true )
    {
        
SendClientMessageplayeridVERMELHO"Vocк estб mudo!" ) ;
        return 
;
    }
    new 
string 148 ], aname MAX_PLAYER_NAME ] ;
    
GetPlayerNameplayeridaname,sizeofaname ) ) ;
    
formatstring,sizeof( string ) ," [ %d ] %s {FFFFFF}diz: %s"playeridanametext ) ;
    
SendClientMessageToAllGetPlayerColorplayerid ) ,string ) ;
    return 
;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)