Command not working!
#7

Its not important if the commandtext return 0, 1 or any other value!

The problem you had you checked if the player have 10'000'000 money and if he have less than 1'000'000, also if you have something between 1'000'000 and 10'000'000 money, you wont get any message

That maybe happend because the numbers are unreadable if they arent grouped
You could have used else, with that you wouldnt have had this problem

pawn Код:
if (strcmp(cmdtext, "/buyaccess", true) == 0)
    {
        if (GetPlayerMoney(playerid) >= 10_000_000)
        { //with that is the number better readable, pawn supports this (source: pawn-lang.pdf)
            SendClientMessage(playerid, 0x33AA33AA, "You just bought access to weapon store!");
            SetPlayerMoney(playerid, gPlayerMoney[playerid] - 10000000);
            gGunAccess[playerid] += 1;
        }
        else    SendClientMessage(playerid, 0xAA3333AA, "You have not enough money!");
        return  true;
    }
Reply


Messages In This Thread
Command not working! - by cigo - 05.07.2009, 09:08
Re: Command not working! - by Grim_ - 05.07.2009, 09:13
Re: Command not working! - by Ignas1337 - 05.07.2009, 09:19
Re: Command not working! - by refshal - 05.07.2009, 09:25
Re: Command not working! - by cigo - 05.07.2009, 13:29
Re: Command not working! - by cigo - 05.07.2009, 15:07
Re: Command not working! - by Nero_3D - 05.07.2009, 16:36
Re: Command not working! - by Ignas1337 - 05.07.2009, 16:53

Forum Jump:


Users browsing this thread: 1 Guest(s)