OOC and LOW chat CMD
#1

Guys, how to make /ooc and /low commands for chat? Please tell me I want them for my RP server.
Reply
#2

Ill just give u mine from my GM:

/ooc

PHP код:
ґif(strcmp(cmd"/gooc"true) == || strcmp(cmd"/o"true) == 0)
        {
            if(
IsPlayerConnected(playerid))
            {
                if ((
OOCStatus) == && PlayerInfo[playerid][pAdmin] < && PlayerInfo[playerid][pGm] < 1)
                {
                    
SendClientMessage(playeridCOLOR_RED,"{FF0000}[Erro]: {FFFFFF}Chat OOC esta acutalmente indesponivel (Indisponibilizado por um admin).");
                    return 
1;
                }
                if(
Muted[playerid])
                {
                    
SendClientMessage(playeridCOLOR_RED,"{FF0000}[Erro]: {FFFFFF}Nao consegues falar, estas muted!");
                    return 
1;
                }
                new 
length strlen(cmdtext);
                while ((
idx length) && (cmdtext[idx] <= ' '))
                {
                    
idx++;
                }
                new 
offset idx;
                new 
result[128];
                while ((
idx length) && ((idx offset) < (sizeof(result) - 1)))
                {
                    
result[idx offset] = cmdtext[idx];
                    
idx++;
                }
                
result[idx offset] = EOS;
                if(!
strlen(result))
                {
                    
SendClientMessage(playeridCOLOR_LIGHTRED,"{ADFF2F}[Comando]: {FFFFFF} [/o]oc [message]");
                    return 
1;
                }
                if(
PlayerInfo[playerid][pAdmin] >= && AdminDuty[playerid] == 1)
                {
                    if(
PlayerInfo[playerid][pAdmin] == 25)
                    {
                        
format(stringsizeof(string), "(( [OOC:] Scripter %s: %s ))"GetPlayerNameEx(playerid), result);
                        
SendClientMessageToAll(COLOR_SCRIPTER,string);
                        
OOCLog(string);
                        return 
1;
                    }
                    if(
PlayerInfo[playerid][pAdmin] > 25)
                    {
                        
format(stringsizeof(string), "(( [OOC:] Fundador %s: %s ))"GetPlayerNameEx(playerid), result);
                        
SendClientMessageToAll(COLOR_FUNDADOR,string);
                        
OOCLog(string);
                        return 
1;
                    }
                    if(
PlayerInfo[playerid][pAdmin] >= 19)
                    {
                        
format(stringsizeof(string), "(( [OOC:] Responsavel %s: %s ))"GetPlayerNameEx(playerid), result);
                        
SendClientMessageToAll(COLOR_RESPONSAVEL,string);
                        
OOCLog(string);
                        return 
1;
                    }
                    else if(
PlayerInfo[playerid][pAdmin] >= 15)
                    {
                        
format(stringsizeof(string), "(( [OOC:] Head-Admin %s: %s ))"GetPlayerNameEx(playerid), result);
                        
SendClientMessageToAll(COLOR_HEADADMIN,string);
                        
OOCLog(string);
                        return 
1;
                    }
                    else
                    {
                        
format(stringsizeof(string), "(( [OOC:] Administrador %s: %s ))"GetPlayerNameEx(playerid), result);
                        
SendClientMessageToAll(COLOR_ADMIN,string);
                        
OOCLog(string);
                        return 
1;
                    }
                }
                if(
PlayerInfo[playerid][pGm] >= && GMDuty[playerid] == 1)
                {
                    
format(stringsizeof(string), "(( [OOC:] GameMaster %s: %s ))"GetPlayerNameEx(playerid), result);
                    
SendClientMessageToAll(COLOR_GAMEMASTER,string);
                    
OOCLog(string);
                    return 
1;
                }
                else if(
PlayerInfo[playerid][pVipActive] >= 1)
                {
                    
format(stringsizeof(string), "(( [OOC:] VIP %s: %s ))"GetPlayerNameEx(playerid), result);
                    
SendClientMessageToAll(COLOR_WHITE,string);
                    
OOCLog(string);
                }
                else
                {
                    
format(stringsizeof(string), "(( [OOC:] %s: %s ))"GetPlayerNameEx(playerid), result);
                    
SendClientMessageToAll(COLOR_WHITE,string);
                    
OOCLog(string);
                }
            }
            return 
1;
        } 


/low

PHP код:
if(strcmp(cmd"/baixo"true) == 0)
        {
            if(
IsPlayerConnected(playerid))
            {
                new 
length strlen(cmdtext);
                while ((
idx length) && (cmdtext[idx] <= ' '))
                {
                    
idx++;
                }
                new 
offset idx;
                new 
result[128];
                while ((
idx length) && ((idx offset) < (sizeof(result) - 1)))
                {
                    
result[idx offset] = cmdtext[idx];
                    
idx++;
                }
                
result[idx offset] = EOS;
                if(!
strlen(result))
                {
                    
SendClientMessage(playeridCOLOR_LIGHTRED,"{ADFF2F}[Comando]: {FFFFFF} /baixo [mensagem]");
                    return 
1;
                }
                new 
pArquivo[128],string2[128];
                for(new 
0MAX_PLAYERSi++)
                {
                    
format(pArquivosizeof(pArquivo), "CRP_Scriptfiles/Accounts/Friends/%s.ini"playerName[playerid]);
                    if(!
IsPlayerConnected(i)) continue;
                    if(
dini_Int(pArquivoplayerName[i]) == 1)
                    {
                        if(
PlayerInfo[playerid][pMaskuse] == 1)
                          {
                              
format(stringsizeof(string), "[Baixo:] - Mascarado diz:");
                            
ProxDetector_Chat(3.0playeridistringresultCOLOR_GREY);
                            
format(string2sizeof(string2), "baixo: %s"result);
                            
SetPlayerChatBubble(playeridstring20xFFFFFFFF3.04000);
                          }
                          else
                          {
                            
format(stringsizeof(string), "[Baixo:] - %s diz:"GetPlayerNameEx(playerid), result);
                            
ProxDetector_Chat(3.0playeridistringresultCOLOR_LIGHTGREEN);
                            
format(string2sizeof(string2), "baixo: %s"result);
                            
SetPlayerChatBubble(playeridstring20xFFFFFFFF3.04000);
                        }
                    }
                    else if(
dini_Int(pArquivoplayerName[i]) == 2)
                    {
                        if(
PlayerInfo[playerid][pMaskuse] == 1)
                          {
                              
format(stringsizeof(string), "[Baixo:] - Mascarado diz:");
                            
ProxDetector_Chat(3.0playeridistringresultCOLOR_GREY);
                            
format(string2sizeof(string2), "baixo: %s"result);
                            
SetPlayerChatBubble(playeridstring20xFFFFFFFF3.04000);
                          }
                          else
                          {
                            
format(stringsizeof(string), "[Baixo:] - %s diz:"GetPlayerNameEx(playerid), result);
                            
ProxDetector_Chat(3.0playeridistringresultCOLOR_YELLOW);
                            
format(string2sizeof(string2), "baixo: %s"result);
                            
SetPlayerChatBubble(playeridstring20xFFFFFFFF3.04000);
                        }
                    }
                    else
                    {
                        if(
PlayerInfo[playerid][pMaskuse] == 1)
                          {
                              
format(stringsizeof(string), "[Baixo:] - Mascarado diz:");
                            
ProxDetector_Chat(3.0playeridistringresultCOLOR_GREY);
                            
format(string2sizeof(string2), "baixo: %s"result);
                            
SetPlayerChatBubble(playeridstring20xFFFFFFFF3.04000);
                          }
                          else
                          {
                            
format(stringsizeof(string), "[Baixo:] - Desconhecido diz:"result);
                            
ProxDetector_Chat(3.0playeridistringresultCOLOR_LIGHTRED);
                            
format(string2sizeof(string2), "baixo: %s"result);
                            
SetPlayerChatBubble(playeridstring20xFFFFFFFF3.04000);
                        }
                    }
                }
            }
            return 
1;
        } 



Of course there are logs and everything that u probably dont want so take just what u need from those commands
Reply
#3

Listen I am using ZCMD. So,plz make me ZCMD commands and they should be in English.
Reply
#4

Quote:
Originally Posted by TopShooter
Посмотреть сообщение
I want /ooc and /low command.
Reply
#5

Can someone plz tell me?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)