[REP+] Problem with CMD
#1

Hello all!

i have a problem with cmds.

1)
pawn Код:
/adjust name
[QUOTE]CMD:adjust(playerid, params[])
{
    if(PlayerInfo[playerid][pFMember] == 255)
    {
        SendClientMessageEx(playerid, COLOR_GREY, "You aren't in a family.");
        return 1;
    }
    new family = PlayerInfo[playerid][pFMember];
    new string[128];
    if(PlayerInfo[playerid][pRank] == 6)
    {
        new choice[32], opstring[100];
        if(sscanf(params, "s[32]S[100]", choice, opstring))
        {
            SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /adjust [name]");
            SendClientMessageEx(playerid, COLOR_WHITE, "Available Names: Name, MOTD, Safe, Invite, Uninvite");
            return 1;
        }

        if(strcmp(choice,"name",true) == 0)
        {
            if(PlayerInfo[playerid][pRank] == 6)
            {
                if(!opstring[0])
                {
                    SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /adjust name [family name]");
                    return 1;
                }
                if(strfind(opstring, "|", true) != -1)
                {
                    SendClientMessageEx(playerid, COLOR_GRAD2,  "You can't use '|' in a family name.");
                    return 1;
                }
                if(strlen(opstring) >= 40 )
                {
                    SendClientMessageEx( playerid, COLOR_GRAD1, "That family name is too long, please refrain from using more than 40 characters." );
                    return 1;
                }
                strmid(FamilyInfo[family][FamilyName], opstring, 0, strlen(opstring), 100);
                SaveFamilies();
                SendClientMessageEx(playerid, COLOR_WHITE, "You've adjusted your family's name.");
                format(string, sizeof(string), "%s adjusted family %d's name to %s", GetPlayerNameEx(playerid), family+1, opstring);
                Log("logs/family.log", string);
            }
        }

2) i need the /pm cmd

Thanx!
Reply


Messages In This Thread
[REP+] Problem with CMD - by virusa1 - 27.09.2012, 19:17
Re: [REP+] Problem with CMD - by ikbenremco - 27.09.2012, 19:26
Re: [REP+] Problem with CMD - by .v - 27.09.2012, 19:30
Re: [REP+] Problem with CMD - by virusa1 - 27.09.2012, 19:32
Re: [REP+] Problem with CMD - by virusa1 - 27.09.2012, 19:34
Re: [REP+] Problem with CMD - by virusa1 - 27.09.2012, 19:41
Re: [REP+] Problem with CMD - by ikbenremco - 27.09.2012, 19:49
Re: [REP+] Problem with CMD - by virusa1 - 27.09.2012, 19:56
Re: [REP+] Problem with CMD - by ikbenremco - 28.09.2012, 15:51
Re: [REP+] Problem with CMD - by virusa1 - 28.09.2012, 19:02

Forum Jump:


Users browsing this thread: 1 Guest(s)