/bonus > nefungue
#6

Quote:
Originally Posted by [B2K
Hustler ]
You keep creating the variable in the command, so you would keep getting the message:
"Prave jsis zapnul ukazovani bonusu."

Do this:

Under OnGameModeInit:

pawn Код:
new bool:bonused[MAX_PLAYERS] = true;
the command:
pawn Код:
dcmd_bonus(playerid, params[])
{
    #pragma unused params
    if(IsPlayerConnected(playerid))
    {
        if(bonused[playerid] == false)
        {
            bonused[playerid] = true;
            EnableStuntBonusForPlayer(playerid, 1);
            SendClientMessage(playerid, BARVA_ZELENA, "Prave jsis zapnul ukazovani bonusu.");
        }
        else if(bonused[playerid] == true)
        {
            bonused[playerid] = false;
            EnableStuntBonusForPlayer(playerid, 0);
            SendClientMessage(playerid, BARVA_ZELENA, "Prave jsis vypnul ukazovani bonusu.");
        }
    }
    return true;
}
Thank you, it works.
Reply


Messages In This Thread
/bonus > nefungue - by ToMmY1547 - 16.05.2009, 19:31
Re: /bonus > nefungue - by ToMmY1547 - 16.05.2009, 20:21
Re: /bonus > nefungue - by miokie - 16.05.2009, 20:30
Re: /bonus > nefungue - by ToMmY1547 - 16.05.2009, 20:34
Re: /bonus > nefungue - by member - 16.05.2009, 20:46
Re: /bonus > nefungue - by ToMmY1547 - 16.05.2009, 20:52

Forum Jump:


Users browsing this thread: 1 Guest(s)