How to convert this command into ZCMD?
#7

Ok, so I messed up everything now...

THIS command, /setaccent, sets your own accent...It should set ANOTHER player's accent, not your own..
/setaccent [Player ID/Part of name] [Accent]


PHP код:
CMD:setaccent(playerid, params[])
{
    if(
PlayerInfo[playerid][pAdmin] > 1)
    {
        new 
accent[27], string[128], tmp[256];
        if(
sscanf(params, "s[27]", accent))
        {
            
SendClientMessage(playerid,0xFFFFFFAA,"Usage: /setaccent {58A624}[ Accent name ]{FFFFFF}.");
            return 
1;
        }
        if(
strlen(accent) <= 6 || strlen(accent) > 26) return cmd_setaccent(playerid, ""); // recall the command /setaccent
        
format(string,sizeof(string),"Accent: You have changed your accent to {58A624}%s.",accent);
        
SendClientMessage(playerid,0xFFFFFFAA,string);
        
strmid(pAccent[playerid],tmp,0,sizeof(tmp),255);
    }
    return 
1;
} 
Now, another problem I have is this...
This is my OnPlayerText, I have it if the player is talking on a cellphpone or not
PHP код:
public OnPlayerText(playerid, text[])
{
    if(
OnCall[playerid] == -1)//If the player is not talking on a cellphone then
    
{
        if(
strlen(pAccent[playerid]) > 0)
        {
            
format(message,sizeof(message),"%s [%s accent]: %s", GetName(playerid), pAccent[playerid], text);
            
ProxDetector(30.0, playerid, message, -1);
              
Log("/logs/chat.txt", message);
              
SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
        }
        else
        {
             
format(message, sizeof(message), "%s says: %s", GetName(playerid), text);
              
ProxDetector(30.0, playerid, message, -1);
              
Log("/logs/chat.txt", message);
              
SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
          }
    }
    
       if(
OnCall[playerid] != -1 )//If the player is talking on a cellphone then
    
{
        if(
strlen(pAccent[playerid]) > 0)
        {
            
format(string,sizeof(string),"%s [Muffled %s accent](cellhpone) %s", GetPlayerNameEx(playerid), pAccent[playerid], text);
            
ProxDetector(20.0, playerid, string, COLOR_FADE1);
              
Log("/logs/chat.txt", string);
              
SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
        }
        else
        {
        
format(string, sizeof(string), "(cellphone) %s says: %s", GetPlayerNameEx(playerid), text);
        
ProxDetector(20.0, playerid, string,COLOR_FADE1);
        
Log("/logs/chat.txt", string);
        
SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
        }
    }
    
    
    if(
IsPlayerConnected(OnCall[playerid]))
    {
        if(
OnCall[OnCall[playerid]] == playerid)
        {
            
SendClientMessage(OnCall[playerid], COLOR_YELLOW, string);
            
Log("/logs/cellphone.txt", message);
        }
    }
    return 
0;
} 
OnPlayerConnect

PHP код:
public OnPlayerConnect(playerid)
{
        new 
string[] = " ";
        
strmid(pAccent[playerid],string,0,sizeof string ,255);
        return 
1;
} 
OnPlayerDisconnect

PHP код:
public OnPlayerDisconnect(playerid, reason)
{
    new 
string[] = " ";
        
strmid(pAccent[playerid],string,0,sizeof string ,255);
        return 
1;
} 
God faken damn it, if anyone could help it would mean the world to me
Reply


Messages In This Thread
How to convert this command into ZCMD? - by NotYoMama - 10.07.2015, 13:42
Re: How to convert this command into ZCMD? - by Mouiz - 10.07.2015, 13:48
Re: How to convert this command into ZCMD? - by JaKe Elite - 10.07.2015, 13:59
Re: How to convert this command into ZCMD? - by NotYoMama - 10.07.2015, 13:59
Re: How to convert this command into ZCMD? - by NotYoMama - 10.07.2015, 14:04
Re: How to convert this command into ZCMD? - by JaKe Elite - 10.07.2015, 14:05
Re: How to convert this command into ZCMD? - by NotYoMama - 10.07.2015, 14:19
Re: How to convert this command into ZCMD? - by JaKe Elite - 10.07.2015, 14:40
Re: How to convert this command into ZCMD? - by NotYoMama - 10.07.2015, 14:55
Re: How to convert this command into ZCMD? - by Threshold - 10.07.2015, 15:06

Forum Jump:


Users browsing this thread: 1 Guest(s)