[Ajuda] Clan Chat
#1

Queria Tranformar Isso em Um CMD:
PHP код:
public OnPlayerText(playeridtext[])
{
    if(
text[0] == '!')
    {
        
format(pFilesizeof(pFile), "Servidor/Clas/%s.ini"PlayerName(playerid));
        if(
dini_Exists(pFile))
        {
            if(
strcmp(dini_Get(pFile"cla"), "Nenhum"false))
            {
                new
                
tmp[128]
                ;
                
strmid(tmptext1strlen(text));
                if(!
strlen(tmp))
                {
                    
SendClientMessage(playerid, -1"[New-TheDM] {1E90FF}Uso correto: ! [ Mensagem ]");
                    return 
0;
                }
                else
                {
                    for(new 
0MAX_PLAYERSc++)
                    {
                        if(
IsPlayerConnected(c))
                        {
                            
format(gFilesizeof(gFile), "Servidor/Clas/%s.ini"PlayerName(c));
                            if(
strcmp(dini_Get(gFile"cla"), "Nenhum"false))
                            {
                                if(
strcmp(dini_Get(gFile"cla"), dini_Get(pFile"cla"), true) == 0)
                                {
                                    
format(gstringsizeof(gstring), "| Chat Clг | %s: %s"PlayerName(playerid), tmp);
                                    
SendClientMessage(c0x00FF00AAgstring);
                                }
                            }
                        }
                    }
                    return 
0;
                }
            }
        }
    }
        return 
1;

Reply
#2

Bom, tem varios tutoriais que tu pode achar np fуrum falando sobre como usar parвmetros no zcmd.Pode tambйm optar a usar sscanf.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)