DCMD problem.
#1

Hi.

I have a script with DMCD and STRCMP. The STRCMP works perfectly, DMCD doesen't work.
Here's the code.

Under OnPlayerCommandText:
pawn Код:
dcmd(playamusic, 10, cmdtext);
    dcmd(stopamusic, 10, cmdtext);
    dcmd(nearmapicon, 11, cmdtext);
    dcmd(settaradio, 8, cmdtext);
    //dcmd(syncturfradar, 13, cmdtext);
    //dcmd(setfamcolor, 11, cmdtext);
    //dcmd(claimturf, 9, cmdtext);
    dcmd(offjail, 7, cmdtext);
    dcmd(unban, 5, cmdtext);
    dcmd(banaccount, 10, cmdtext);
    dcmd(piantac4, 7, cmdtext);
    dcmd(settarapina, 12, cmdtext);
    dcmd(accettarapina, 13, cmdtext);
    dcmd(invitarapina, 13, cmdtext);
    dcmd(setbankreload, 13, cmdtext);
    dcmd(sethouseowner, 13, cmdtext);
    dcmd(setbizowner, 11, cmdtext);
    dcmd(prendisoldi, 8, cmdtext);
    dcmd(settaaccento, 9, cmdtext);
    dcmd(deleteaccount, 13, cmdtext);
    dcmd(duello, 4, cmdtext);
    dcmd(trascina, 4, cmdtext);
    dcmd(strascina, 8, cmdtext);
    dcmd(mettiti, 4, cmdtext);
    dcmd(levati, 6, cmdtext);
    // New BoomBox System
    dcmd(piazzaboombox, 12, cmdtext);
    dcmd(accendi, 6, cmdtext);
    dcmd(raccogliboombox, 13, cmdtext);
    // House System Commands
    dcmd(createhouse, 11, cmdtext);
    dcmd(deletehouse, 11, cmdtext);
    dcmd(houseprice, 10, cmdtext);
    dcmd(movehouse, 9, cmdtext);
    dcmd(houselevel, 10, cmdtext);
    dcmd(clearhouse, 10, cmdtext);
    dcmd(chiudicasa, 9, cmdtext);
    dcmd(compracasa, 8, cmdtext);
    // motel SYSTEM COMMANDS
    dcmd(createmotel, 11, cmdtext);
    dcmd(deletemotel, 11, cmdtext);
    dcmd(movemotel, 9, cmdtext);
    dcmd(lockmotel, 9, cmdtext);
    dcmd(makemotelvip, 12, cmdtext);
    dcmd(motelname, 9, cmdtext);
    dcmd(motelvw, 7, cmdtext);
    // Business System Commands
    dcmd(compra, 3, cmdtext);
    dcmd(settaprezzo, 8, cmdtext);
    dcmd(createbiz, 9, cmdtext);
    dcmd(deletebiz, 9, cmdtext);
    dcmd(clearbiz, 8, cmdtext);
    dcmd(biztype, 7, cmdtext);
    dcmd(bizprice, 8, cmdtext);
    dcmd(bizprods, 8, cmdtext);
    dcmd(bizlevel, 8, cmdtext);
    dcmd(comprabiz, 6, cmdtext);
    dcmd(chiudibiz, 7, cmdtext);
    dcmd(compraprodotti, 8, cmdtext);
    dcmd(movebiz, 7, cmdtext);
    // ATM SYSTEM COMMANDS
    dcmd(atmfee, 6, cmdtext);
    dcmd(createatm, 9, cmdtext);
    dcmd(deleteatm, 9, cmdtext);
    dcmd(atmcash, 7, cmdtext);
    dcmd(lockatm, 7, cmdtext);
    dcmd(moveatm, 7, cmdtext);
    // Information Boards System
    dcmd(createInfoBoard, 15, cmdtext);
    dcmd(deleteInfoBoard, 15, cmdtext);
    dcmd(setinfoboardstring, 18, cmdtext);
    // OOC SHOP SYSTEM Commands
    dcmd(createOOCshop, 13, cmdtext);
    dcmd(deleteOOCshop, 13, cmdtext);
    // MAP BOX SYSTEM COMMANDS
    dcmd(createMAPB, 10, cmdtext);
    dcmd(deleteMAPB, 10, cmdtext);
    // GAS STATION SYSTEM COMMANDS
    dcmd(creategstation, 14, cmdtext);
    dcmd(deletegstation, 14, cmdtext);
    // HOUSE SALE SIGN SYSTEM COMMANDS
    dcmd(createHSS, 9, cmdtext);
    dcmd(deleteHSS, 9, cmdtext);
    // Building System Commands
    dcmd(createbuilding, 14, cmdtext);
    dcmd(deletebuilding, 14, cmdtext);
    dcmd(movebuilding, 12, cmdtext);
    dcmd(lockbuilding, 12, cmdtext);
    dcmd(makebuildingvip, 15, cmdtext);
    dcmd(buildingname, 12, cmdtext);
    dcmd(buildingvw, 10, cmdtext);
    // Hair System
    dcmd(capelli,4,cmdtext);
    // Garage System
    dcmd(trucca, 4, cmdtext);
    dcmd(truccavip, 7, cmdtext);
And an example of a command is...
pawn Код:
dcmd_trascina(playerid, params[])
{
    new id, string[ 128 ];
    if( sscanf( params, "u", id) )
    {
        SendClientMessage( playerid, COLOR_WHITE, "USO: /trascina [PlayerID/PartOfName]" );
    }
    else
    {
     if(IsACop(playerid))
        {
            if(GetDistanceBetweenPlayers( playerid, id) < 7)
            {
                ApplyAnimation(id,"SWEET","Sweet_injuredloop", 4.0, 1, 0, 0, 0, 0,1);
                ApplyAnimation(playerid,"BOMBER","BOM_Plant",4.0,0,0,0,0,0,1);
                PlayerInfo[id][BeingDraggedBy] = playerid;
                //format( string, sizeof( string ), "You have started to drag %s.", PlayerName(id) );
                //SendClientMessage( playerid, COLOR_LIGHTBLUE, string);
                format( string, sizeof( string ), "* %s prende il braccio di %s e lo trascina.", PlayerName(playerid), PlayerName(id) );
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            }
            else
            {
                SendClientMessage( playerid, COLOR_GRAD1, "Sei troppo lontano!" );
            }
        }
        else
        {
            SendClientMessage( playerid, COLOR_GRAD1, "Non sei un poliziotto." );
        }
    }
    return 1;
}
What can I do? (I use a United Roleplay)
Thanks.
Reply
#2

Resolved by me. Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)