16.05.2009, 20:46
You keep creating the variable in the command, so you would keep getting the message:
"Prave jsis zapnul ukazovani bonusu."
Do this:
Under OnGameModeInit:
the command:
"Prave jsis zapnul ukazovani bonusu."
Do this:
Under OnGameModeInit:
pawn Код:
new bool:bonused[MAX_PLAYERS] = true;
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;
}