SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 13/07/2019, 01:02 AM   #1
ruanml49
Little Clucker
 
Join Date: Jun 2019
Posts: 2
Reputation: 0
Question Comando chat Familia

COMMAND:f(playerid, params[]) {
if(PlayerInfo[playerid][pPermissaoChat] == 1)
if(isnull(params))
return SendClientMessage(playerid, corCinza, "[ USE ]: /f [Texto]");

new str[128], file[128], family[128], index = checkNick('_', getNome(playerid));
strmid(family, getNome(playerid), index + 1,MAX_PLAYER_NAME);

format(file, 64, "Familias/%s.ini", family);
if(!DOF2::FileExists(file))
return SendClientMessage(playerid, corCinza, "[ ERRO ]: Esta fam?lia n?o existe!");

format(str, 128, "( Chat %s ) %s: %s", family, getNome(playerid), params);
for(new i = 0; i < GetPlayerPoolSize(); i++) {
new _family[128];
new _index = checkNick('_', getNome(i));
strmid(_family, getNome(i), _index + 1,MAX_PLAYER_NAME);
if (!strcmp(_family, family)) {
SendClientMessage(i, corChat, str);
}
}
return true;
}

Eu Digito no Chat e nao aparece nada eu nao sei como resolver!Por favor quem poder mim ajuda eu agradeço
ruanml49 is offline   Reply With Quote
Old 13/07/2019, 02:55 AM   #2
moura98
Huge Clucker
 
moura98's Avatar
 
Join Date: Jul 2015
Location: Brazil
Posts: 312
Reputation: 17
Default Re: Comando chat Familia

falta varias chaves
loop errado

nao testei mas tente isso

PHP Code:
COMMAND:f(playeridparams[])
{
    if(
PlayerInfo[playerid][pPermissaoChat] == 1)
    {
        if(
isnull(params)) return SendClientMessage(playeridcorCinza"[ USE ]: /f [Texto]");

        new 
str[128], file[128], family[128], index checkNick('_'getNome(playerid));
        
strmid(familygetNome(playerid), index 1,MAX_PLAYER_NAME);

        
format(file64"Familias/%s.ini"family);
        if(!
DOF2::FileExists(file))    return SendClientMessage(playeridcorCinza"[ ERRO ]: Esta fam?lia n?o existe!");

        
format(str128"( Chat %s ) %s: %s"familygetNome(playerid), params);
        for(new 
iGetPlayerPoolSize(); <= p; ++i)
        {
            new 
_family[128];
            new 
_index checkNick('_'getNome(i));
            
strmid(_familygetNome(i), _index 1,MAX_PLAYER_NAME);
            if (!
strcmp(_familyfamily))
            {
                
SendClientMessage(icorChatstr);
            }
        }
    }
    return 
true;

__________________
moura98 is offline   Reply With Quote
Old 13/07/2019, 08:45 PM   #3
ruanml49
Little Clucker
 
Join Date: Jun 2019
Posts: 2
Reputation: 0
Default Re: Comando chat Familia

Quote:
Originally Posted by moura98 View Post
falta varias chaves
loop errado

nao testei mas tente isso

PHP Code:
COMMAND:f(playeridparams[])
{
    if(
PlayerInfo[playerid][pPermissaoChat] == 1)
    {
        if(
isnull(params)) return SendClientMessage(playeridcorCinza"[ USE ]: /f [Texto]");

        new 
str[128], file[128], family[128], index checkNick('_'getNome(playerid));
        
strmid(familygetNome(playerid), index 1,MAX_PLAYER_NAME);

        
format(file64"Familias/%s.ini"family);
        if(!
DOF2::FileExists(file))    return SendClientMessage(playeridcorCinza"[ ERRO ]: Esta fam?lia n?o existe!");

        
format(str128"( Chat %s ) %s: %s"familygetNome(playerid), params);
        for(new 
iGetPlayerPoolSize(); <= p; ++i)
        {
            new 
_family[128];
            new 
_index checkNick('_'getNome(i));
            
strmid(_familygetNome(i), _index 1,MAX_PLAYER_NAME);
            if (!
strcmp(_familyfamily))
            {
                
SendClientMessage(icorChatstr);
            }
        }
    }
    return 
true;



=
VLLW MANO DEU CERTO AQUI +REP
ruanml49 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FS] CHAT PARA FAMILIA/Family LincolnBr Scripting Help 1 23/07/2017 06:01 PM
[Pedido] /familia chat maikons Português/Portuguese 20 19/12/2013 01:42 PM
[Ajuda] Como Crio Um Chat Da Familia gabrielloko157 Português/Portuguese 9 03/08/2012 04:31 PM
[Ajuda] Comando chat familia com erro LordShadow Português/Portuguese 7 19/06/2012 06:27 PM


All times are GMT. The time now is 04:02 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.