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; }
---------- Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3.7, ©2005-2015 SA-MP Team [19:14:45] [19:14:45] Server Plugins [19:14:45] -------------- [19:14:45] Loading plugin: sscanf [19:14:45] [19:14:45] =============================== [19:14:45] sscanf plugin loaded. [19:14:45] Version: 2.8.1 [19:14:45] © 2012 Alex "******" Cole [19:14:45] =============================== [19:14:45] Loaded. [19:14:45] Loading plugin: streamer [19:14:45] *** Streamer Plugin v2.7.7 by Incognito loaded *** [19:14:45] Loaded. [19:14:45] Loaded 2 plugins. [19:14:45] [19:14:45] Filterscripts [19:14:45] --------------- [19:14:45] Loading filterscript 'avs.amx'... [19:14:45] ------------------------------------------------ [19:14:45] Advanced Vehicle System 1.0 by MadeMan [19:14:45] ------------------------------------------------ [19:14:45] Loaded 13 vehicles [19:14:45] Loaded 1 dealerships [19:14:45] Loaded 1 fuel stations [19:14:45] ------------------------------------------------ [19:14:45] Loading filterscript 'billboard.amx'... [19:14:45] -------------*********---------------- [19:14:45] Simple Billboard System [fs] by christiand [19:14:45] ----------------Loaded---------------- [19:14:45] Loading filterscript 'HealthBar.amx'... [19:14:45] Loading filterscript 'jdhs.amx'... [19:14:45] [server] Initiated Jason's Dynamic Housing System [19:14:47] Loaded 4 filterscripts. [19:14:47] [19:14:47] [19:14:47] [19:14:47] ======================================= [19:14:47] | | [19:14:47] | YSI version 3.09.0684 | [19:14:47] | By Alex "******" Cole | [19:14:47] | | [19:14:47] ======================================= [19:14:47] [19:14:47] [19:14:47] [19:14:47] ---------------------------------- [19:14:47] ABR Fun Factory by Missclick [19:14:47] ---------------------------------- [19:14:47] Number of vehicle models: 12 [19:15:07] [connection] 192.168.1.4:62274 requests connection cookie. [19:15:08] Incoming connection: 192.168.1.4:62274 id: 0 [19:15:09] [join] Missclick has joined the server (0:192.168.1.4) [19:15:57] RCON (In-Game): Player #0 (Missclick) has logged in. [19:18:08] [part] Missclick has left the server (0:1)
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.");
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;
}
Update your sscanf plugin with latest plugin and includes then re-compile script and replace your command with this command
pawn Код:
|
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, "i", 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; }