22.11.2014, 12:09
Код:
COMMAND:cangua(playerid, params[]) { new horse, Money; if(!sscanf(params,"ii",horse, Money) && horse < 5 && horse > 0 && Money <= CashHigherBounds && Money >= CashLowerBounds) { if (GetPlayerMoney(playerid) >= Money) { if (RaceStarted == 1) { SendClientMessage(playerid, 0xFF0000FF, "Cuoc dua da bat dau, ban khong dat cuoc."); } else { if (MoneyBet[playerid] > 0) { SendClientMessage(playerid, 0xFF0000FF, "Ban da dat cuoc!."); } else { MoneyBet[playerid] = Money; GivePlayerMoney(playerid, -Money); BetOnHorse[playerid] = horse; new string[128]; format(string, sizeof(string), "Ban vua duoc %d vao con ngua so %d.",MoneyBet[playerid],BetOnHorse[playerid]); SendClientMessage(playerid, 0x00FFFFFF, string); } } } else { SendClientMessage(playerid, 0xFF0000FF, "Ban khong co du tien."); new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid, X, Y, Z); PlayerPlaySound(playerid, 5405, X, Y, Z); } } else { new string[128]; format(string, sizeof(string), "CU PHAP: /cangua [Ngua so(1-4)][So luong(%d-%d]",CashLowerBounds,CashHigherBounds); SendClientMessage(playerid, 0xFF0000FF,string); } return 1; }
Add in where? not work