05.09.2015, 16:17
This command
Is not working, it keeps telling me <Usage> /lotto prize even if I type a prize example /lotto 1000
Код:
CMD:setlotto(playerid, params[]) { new string[256], lottopr; if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "[{FF0606}ERROR{FFFFFF}]: You have no authorization to use this command."); if(sscanf(params, "d", lottopr)) return SendClientMessage(playerid, -1, ""COL_LIGHTBLUE"<Usage> "COL_WHITE"/setlotto <prize>"); if(lottopr < 1000 || lottopr > 500000) return SendClientMessage(playerid, -1, "Invalid prize number. Prize must be between $1,000 and $500,000."); if(LottoNum != 0) return SendClientMessage(playerid, -1, "There is a lottery already going on."); else { SendClientMessageToAll(COLOR_LIGHTBLUE, "A lottery has started and will end in 30 seconds! Type "COL_WHITE"/lotto($100) "COL_LIGHTBLUE"to pick your number."); format(string, sizeof(string), "Prize: "COL_WHITE"$%d", lottopr); SendClientMessageToAll(COLOR_LIGHTBLUE, string); LottoNum = 1 + random(80); LottoPrize = lottopr; SetTimer("Lottery", 30000, false); } return 1; }