28.07.2013, 10:38
Код:
CMD:buyheroin(playerid, params[]) { new Heroin[MAX_PLAYERS]; new heroin = SendClientMessage(playerid, 0xFFFFFFFF, "Нямаш достатъчно пари за Хероин"); GetPlayerMoney(playerid); if(GetPlayerMoney(playerid) < 5000) return heroin; GivePlayerMoney(playerid, -5000); Heroin[playerid]++; SendClientMessage(playerid, 0xFFFFFFFF, "Ти си купи хероин"); return 1; } CMD:checkdrugs(playerid, params[]) { new string[128]; new Heroin[MAX_PLAYERS]; format(string, sizeof(string), "Ти имаш %d Heroin", Heroin[playerid]); SendClientMessage(playerid, 0xFFFFFFFF, string); return 1; } CMD:usedrug(playerid, params[]) { new Heroin[MAX_PLAYERS]; if(Heroin[playerid] == 0) return SendClientMessage(playerid, -1, "Нямаш достатъчно Хероин"); Heroin[playerid]--; GivePlayerWeapon(playerid, 24, 433); SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 50); SendClientMessage(playerid, -1, "Ти използва 1 грам хероин"); return 1; }