[Pedido] Chats
#1

Olб eu queria tipo um sisteminha de chat aki pequeno e simples ensinando como criar chat tipo digito "Olб" normalzinho t "Olб" ae aparece tipo "Blackpine [Local]: Olб" ae aparece pra todo mundo perto do player e outro queria que eu digitase @Olб ae aparece assim "@Global "Blackpine: Olб" aparecer isso pra geral do servidor entende todo mundo
se alguem poder me ajudar procurei tutoriais e nгo achei entгo vim pedir ajuda de vocкs
Reply
#2

https://sampwiki.blast.hk/wroot/index.ph...&printable=yes
Reply
#3

Explique-me mais.
Reply
#4

pawn Код:
public OnPlayerText(playerid, text[]) {
    new
        pname[MAX_PLAYER_NAME],
        pcolor = GetPlayerColor(playerid),
        str[128];
       
    GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
   
    format(str, sizeof(str), "%s [Local] diz: {ffffff}%s", pname, text);
   
    new
        Float:x,
        Float:y,
        Float:z;
       
    GetPlayerPos(playerid, x, y, z);
   
    foreach(new i : Player) {
        //
        // 30.0 й o range que a mensagem alcanзa
        // streamedin й para ter certeza que estгo no mesmo interior/vw
        if(IsPlayerStreamedIn(playerid, i) && IsPlayerInRangeOfPoint(i, 30.0, x, y, z)) {
            SendClientMessage(i, pcolor, str);
        }
    }
   
    //
    // OnPlayerText deve retornar 0 para anular o chat padrгo do sa-mp
    return 0;
}
pra fazer o global chat vc usa SendClientMessageToAll e verifica se

pawn Код:
if(text[0] == '@' && text[1]) { // checa se hб continuidade apуs o @
    SendClientMessageToAll..
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)