[Ajuda] como faзo isso ? І
#1

eu queria fazer essa mensagem mostrar para todos eu tentei com SendClientMessageToAll mas nгo consegui alguйm pode me ajudar ?
( format(string, sizeof(string), "the player %s create group name : %s(ID:%d)", grpname, slotid); )
PHP Code:
stock CreateGroup(grpname[], owner)
{
    new 
slotid FindNextSlot();
    
groupinfo[slotid][leader] = owner;
    
format(groupinfo[slotid][grname], 75"%s"grpname);
    
groupinfo[slotid][active] = 1;
    
group[owner][gid] = slotid;
    
group[owner][order] = 1;
    new 
string[120];
    
format(stringsizeof(string), "the player %s create group name : %s(ID:%d)"grpnameslotid);
     
SendClientMessage(owner0xFFCC66string);
    return 
slotid;

e deixar isso em dialog ??
PHP Code:
COMMAND:grouplist(playeridparams[])
{
    if(
isnull(params) && group[playerid][gid] == -1) return SendClientMessage(playerid0xFF0000"Usage: {FFFFFF}/grouplist{FF0000} (group)");
    if(
isnull(params))
    {
         
DisplayGroupMembers(group[playerid][gid], playerid);
           return 
1;
    }
     new 
grid strval(params);
      if(!
groupinfo[grid][active]) return SendClientMessage(playerid0xFF0000"The group ID you have entered is not active!");
       
DisplayGroupMembers(gridplayerid);
    return 
1;

Reply
#2

SendClientMessageToAll(cor, string);
Reply
#3

Quote:
Originally Posted by matheusspohr
View Post
SendClientMessageToAll(cor, string);
e deixar isso em dialog ??
PHP Code:
COMMAND:grouplist(playeridparams[])
{
    if(
isnull(params) && group[playerid][gid] == -1) return SendClientMessage(playerid0xFF0000"Usage: {FFFFFF}/grouplist{FF0000} (group)");
    if(
isnull(params))
    {
         
DisplayGroupMembers(group[playerid][gid], playerid);
           return 
1;
    }
     new 
grid strval(params);
      if(!
groupinfo[grid][active]) return SendClientMessage(playerid0xFF0000"The group ID you have entered is not active!");
       
DisplayGroupMembers(gridplayerid);
    return 
1;

Reply
#4

oque vocк quer por aн em dialog?
Reply
#5

Quote:
Originally Posted by matheusspohr
View Post
oque vocк quer por aн em dialog?
quando o player digitar /grouplist (id) ai mostra oq eu quero ver em dialog

PHP Code:

stock DisplayGroupMembers
(groupidplayerid)
{
    new 
amount[2], string[200], shortstr[55], pname[24];
    
format(stringsizeof(string), "Group Members for %s(ID:%d)"groupinfo[groupid][grname], groupid);
    
SendClientMessage(playerid0xFFFFFFstring);
    
string "";
    for(new 
xx<MAX_PLAYERSx++)
    {
        if(
group[x][gid] == groupid)
        {
            
amount[0] ++;
            
amount[1] ++;
            
GetPlayerName(xpname24);
            if(
groupinfo[groupid][leader] != xformat(shortstrsizeof(shortstr), "%s(%d),"pnamex);
            if(
groupinfo[groupid][leader] == xformat(shortstrsizeof(shortstr), "[LEADER]%s(%d),"pnamex);
            if(
amount[1] == 1format(stringsizeof(string), "%s"shortstr);
            if(
amount[1] != 1format(stringsizeof(string), "%s %s"stringshortstr);
            if(
amount[0] == 6)
            {
                
strdel(stringstrlen(string)-1strlen(string));
                
SendClientMessage(playerid0xFFCC66string);
                
string "";
                
amount[0] = 0;
            }
        }
    }
    
strdel(stringstrlen(string)-1strlen(string));
    if(
amount[0] != 0SendClientMessage(playerid0xFFCC66string);
    return 
1;

Reply
#6

Tente

SendClientMessageToAll(color, message[]);

@Edit Voce pgnt sobre Mandar msg pra todos la em cima , mais aqui perguntou sobre dialog?

Caso for pra mandar uma mensagem pra geral la em cima tente isso acima /\

Agora para fazer um dialog

Clique Aqui!
Reply
#7

Quote:
Originally Posted by iBolivaRevolutioN
View Post
Tente

SendClientMessageToAll(color, message[]);

@Edit Voce pgnt sobre Mandar msg pra todos la em cima , mais aqui perguntou sobre dialog?

Caso for pra mandar uma mensagem pra geral la em cima tente isso acima /\

Agora para fazer um dialog

Clique Aqui!
.

amigo vocк nгoo viu direito lб em cima nгo foi ? eu perguntei soq eu so mandei o comando era pra eu ter mandado do codigo que tem na stock vocк vio errado

Reply
#8

Eu nгo entendi a dificuldade em fazer o que vocк quer. Por que invйs de usar SendClientMessage nгo usa ShowPlayerDialog?
Reply
#9

Quote:
Originally Posted by Kamper
View Post
Eu nгo entendi a dificuldade em fazer o que vocк quer. Por que invйs de usar SendClientMessage nгo usa ShowPlayerDialog?
eu nгo consegui fazer em dialog tentei mas dava errs
Reply
#10

Vocк deve ter uma stock com isso:
PHP Code:
DisplayGroupMembers(gridplayerid); 
Passa ela aн para eu ver.
Reply
#11

Quote:
Originally Posted by matheusspohr
View Post
Vocк deve ter uma stock com isso:
PHP Code:
DisplayGroupMembers(gridplayerid); 
Passa ela aн para eu ver.
PHP Code:

stock DisplayGroupMembers
(groupidplayerid

    new 
amount[2], string[200], shortstr[55], pname[24]; 
    
format(stringsizeof(string), "Group Members for %s(ID:%d)"groupinfo[groupid][grname], groupid); 
    
SendClientMessage(playerid0xFFFFFFstring); 
    
string ""
    for(new 
xx<MAX_PLAYERSx++) 
    { 
        if(
group[x][gid] == groupid
        { 
            
amount[0] ++; 
            
amount[1] ++; 
            
GetPlayerName(xpname24); 
            if(
groupinfo[groupid][leader] != xformat(shortstrsizeof(shortstr), "%s(%d),"pnamex); 
            if(
groupinfo[groupid][leader] == xformat(shortstrsizeof(shortstr), "[LEADER]%s(%d),"pnamex); 
            if(
amount[1] == 1format(stringsizeof(string), "%s"shortstr); 
            if(
amount[1] != 1format(stringsizeof(string), "%s %s"stringshortstr); 
            if(
amount[0] == 6
            { 
                
strdel(stringstrlen(string)-1strlen(string)); 
                
SendClientMessage(playerid0xFFCC66string); 
                
string ""
                
amount[0] = 0
            } 
        } 
    } 
    
strdel(stringstrlen(string)-1strlen(string)); 
    if(
amount[0] != 0SendClientMessage(playerid0xFFCC66string); 
    return 
1

Reply
#12

Quote:
Originally Posted by zPawnu
View Post
PHP Code:

stock DisplayGroupMembers
(groupidplayerid

    new 
amount[2], string[200], shortstr[55], pname[24]; 
    
format(stringsizeof(string), "Group Members for %s(ID:%d)"groupinfo[groupid][grname], groupid); 
    
SendClientMessage(playerid0xFFFFFFstring); 
    
string ""
    for(new 
xx<MAX_PLAYERSx++) 
    { 
        if(
group[x][gid] == groupid
        { 
            
amount[0] ++; 
            
amount[1] ++; 
            
GetPlayerName(xpname24); 
            if(
groupinfo[groupid][leader] != xformat(shortstrsizeof(shortstr), "%s(%d),"pnamex); 
            if(
groupinfo[groupid][leader] == xformat(shortstrsizeof(shortstr), "[LEADER]%s(%d),"pnamex); 
            if(
amount[1] == 1format(stringsizeof(string), "%s"shortstr); 
            if(
amount[1] != 1format(stringsizeof(string), "%s %s"stringshortstr); 
            if(
amount[0] == 6
            { 
                
strdel(stringstrlen(string)-1strlen(string)); 
                
SendClientMessage(playerid0xFFCC66string); 
                
string ""
                
amount[0] = 0
            } 
        } 
    } 
    
strdel(stringstrlen(string)-1strlen(string)); 
    if(
amount[0] != 0SendClientMessage(playerid0xFFCC66string); 
    return 
1

tente:
PHP Code:
#define DIALOG_ALGUMA_COISA 9258374
stock DisplayGroupMembers(groupidplayerid

    new 
amount[2], string[200], shortstr[55], pname[24]; 
    
format(stringsizeof(string), "Group Members for %s(ID:%d)"groupinfo[groupid][grname], groupid); 
    
SendClientMessage(playerid0xFFFFFFstring); 
    
string ""
    for(new 
xx<MAX_PLAYERSx++) 
    { 
        if(
group[x][gid] == groupid
        { 
            
amount[0] ++; 
            
amount[1] ++; 
            
GetPlayerName(xpname24); 
            if(
groupinfo[groupid][leader] != xformat(shortstrsizeof(shortstr), "%s(%d),"pnamex); 
            if(
groupinfo[groupid][leader] == xformat(shortstrsizeof(shortstr), "[LEADER]%s(%d),"pnamex); 
            if(
amount[1] == 1format(stringsizeof(string), "%s"shortstr); 
            if(
amount[1] != 1format(stringsizeof(string), "%s %s"stringshortstr); 
            if(
amount[0] == 6
            { 
                
strdel(stringstrlen(string)-1strlen(string)); 
                
SendClientMessage(playerid0xFFCC66string); 
                
string ""
                
amount[0] = 0
            } 
        } 
    } 
    
strdel(stringstrlen(string)-1strlen(string)); 
    if(
amount[0] != 0ShowPlayerDialog(playeridDIALOG_ALGUMA_COISADIALOG_STYLE_MSGBOX"Titulo"string"Botгo 1""Botгo 2");
    return 
1

Reply
#13

Quote:
Originally Posted by matheusspohr
View Post
tente:
PHP Code:
#define DIALOG_ALGUMA_COISA 9258374
stock DisplayGroupMembers(groupidplayerid

    new 
amount[2], string[200], shortstr[55], pname[24]; 
    
format(stringsizeof(string), "Group Members for %s(ID:%d)"groupinfo[groupid][grname], groupid); 
    
SendClientMessage(playerid0xFFFFFFstring); 
    
string ""
    for(new 
xx<MAX_PLAYERSx++) 
    { 
        if(
group[x][gid] == groupid
        { 
            
amount[0] ++; 
            
amount[1] ++; 
            
GetPlayerName(xpname24); 
            if(
groupinfo[groupid][leader] != xformat(shortstrsizeof(shortstr), "%s(%d),"pnamex); 
            if(
groupinfo[groupid][leader] == xformat(shortstrsizeof(shortstr), "[LEADER]%s(%d),"pnamex); 
            if(
amount[1] == 1format(stringsizeof(string), "%s"shortstr); 
            if(
amount[1] != 1format(stringsizeof(string), "%s %s"stringshortstr); 
            if(
amount[0] == 6
            { 
                
strdel(stringstrlen(string)-1strlen(string)); 
                
SendClientMessage(playerid0xFFCC66string); 
                
string ""
                
amount[0] = 0
            } 
        } 
    } 
    
strdel(stringstrlen(string)-1strlen(string)); 
    if(
amount[0] != 0ShowPlayerDialog(playeridDIALOG_ALGUMA_COISADIALOG_STYLE_MSGBOX"Titulo"string"Botгo 1""Botгo 2");
    return 
1

valeu rep+
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)