This not working
#1

This command
Код:
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;
}
Is not working, it keeps telling me <Usage> /lotto prize even if I type a prize example /lotto 1000
Reply
#2

Can you show your server_log.txt?
Reply
#3

Код:
----------
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)
Reply
#4

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, "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;
}
Reply
#5

Where can I get the new versions of the includes? And also, what is new in the command edited by you? No brackets?
Reply
#6

This is the latest version I could find, not sure if this is the latest but you can give it a try:
https://dl.dropboxusercontent.com/u/...canf-2.8.2.zip
Reply
#7

Quote:
Originally Posted by IceBilizard
Посмотреть сообщение
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, "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;
}
Still not working
Reply
#8

Anyone?
Reply
#9

Код:
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;
}
Reply
#10

What is different here? The 'i'?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)