Can someone help on how to do this means when a player buys booklet that his hospital treatment takes $ 100 and who does booklet that takes his $ 500 means when a player dies and who has a booklet that it took $ 100 and who does not have $ 500
Код:
#include <ZCMD>
new booklet[MAX_PLAYERS];
CMD:buybooklet(playerid, params[])
{
SendClientMessage(playerid, 0x00FF00FF, "You have bought a booklet.");
booklet[playerid] = 1;
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(booklet[playerid] == 1)
{
GivePlayerMoney(playerid, -100);
}
else if(booklet[playerid] == 0)
{
GivePlayerMoney(playerid, -500);
}
return 1;
}