strcmp
#5

But, I using strcmp in onplayertext and it works good, and in cmd not?..

pawn Код:
COMMAND:pinigai( playerid, params[ ] )
{
    if( GetPVarInt( playerid, "Administratorius" ) < 3 ) return SendClientMessage( playerid, -1, ""#h_Balta"[ > ] "#h_Zalia"Jыs neesate "#h_Geltona"Administratorius" );
    if( !strcmp( params, "nuiimti", true ) )
    {
        new
            ID,
            Kiekis
        ;
        if( sscanf( params, "ud", ID, Kiekis ) ) return SendClientMessage( playerid, -1, ""#h_Balta"[ > ] "#h_Zalia"/pinigai nuiimti "#h_Geltona"<Vardas> <Kiekis>" );
        if( ID == INVALID_PLAYER_ID ) return SendClientMessage( playerid, -1, ""#h_Balta"[ > ] "#h_Geltona"Юaidлjas yra "#h_Raudona"neprisijungжs" );
        if( Kiekis > GetPlayerMoneyEx( playerid ) ) return SendClientMessage( playerid, -1, ""#h_Balta"[ > ] "#h_Geltona"Kiekis suvestas "#h_Raudona"blogai" );
        new
            Stringas[ 160 ]
        ;
        format( Stringas, 160, ""#h_Balta"[ > ] "#h_Geltona"Administratorius "#h_Zalia"%s "#h_Raudona"nuemл Jums pinigш. "#h_Orandzine"Kiekis: %d", ZaidejoVardas( playerid ), Kiekis );
        SendClientMessage( ID, -1, Stringas );
        GivePlayerMoneyEx( ID, - Kiekis );
    }
    if( !strcmp( params, "prideti", true ) )
    {
        new
            ID,
            Kiekis
        ;
        if( sscanf( params, "ud", ID, Kiekis ) ) return SendClientMessage( playerid, -1, ""#h_Balta"[ > ] "#h_Zalia"/pinigai prideti "#h_Geltona"<Vardas> <Kiekis>" );
        else if( ID == INVALID_PLAYER_ID ) return SendClientMessage( playerid, -1, ""#h_Balta"[ > ] "#h_Geltona"Юaidлjas yra "#h_Raudona"neprisijungжs" );
        new
            Stringas[ 159 ]
        ;
        format( Stringas, 159, ""#h_Balta"[ > ] "#h_Geltona"Administratorius "#h_Zalia"%s "#h_Raudona"davл Jums pinigш. "#h_Orandzine"Kiekis: %d", ZaidejoVardas( playerid ), Kiekis );
        SendClientMessage( ID, -1, Stringas );
        GivePlayerMoneyEx( ID, Kiekis );
    }
    else
    {
        SendClientMessage( playerid, -1, ""#h_Balta"[ > ] "#h_Zalia"/pinigai "#h_Geltona"nuiimti/prideti" );
    }
    return true;
}
I dont want to use another ways, I just wanna know whats wrong in my strcmp using;<>
Reply


Messages In This Thread
strcmp - by Gh0sT_ - 24.01.2011, 12:16
Re: strcmp - by alpha500delta - 24.01.2011, 12:31
Re: strcmp - by Gh0sT_ - 24.01.2011, 13:12
Re: strcmp - by Stylock - 24.01.2011, 13:46
Re: strcmp - by Gh0sT_ - 24.01.2011, 14:07
Re: strcmp - by Stylock - 24.01.2011, 14:25
Re: strcmp - by JaTochNietDan - 24.01.2011, 14:37

Forum Jump:


Users browsing this thread: 3 Guest(s)