sscanf admin command
#1

Hey, I got some trouble with a command.
I wanted to make a command with that i can respawn all cars.

But everytime i compile my script, i get this error:
Quote:

"error 033: array must be indexed ( variable "--unknown--")"

The line, in that is the error is this:
Код:
if (sscanf(params, "s", command))
here is my complete code of the command:

Код:
CMD:respawn(playerid, params[])
{
	if (IsPlayerAdmin(playerid) == 1)
	{
		new command;
		
		if (sscanf(params, "s", command))
		{
			if (command == "autos")
			{
				SendClientMessageToAll(ORANGE, "*** Autos wurden respawnt");
			}
		}
		SendClientMessage(playerid, RED, "SERVER: Befehl ist noch in Arbeit");
	}
	else
	{
		SendClientMessage(playerid, RED, "SERVER: Du bist nicht als Admin eingeloggt");
	}
	return 1;
}
please help.
i really dont know.

my includes:
Код:
#include <a_samp>
#include <zcmdsscanf>
#include <dudb>
#include <streamer>
Reply


Messages In This Thread
sscanf admin command - by Jonni8 - 25.05.2010, 16:05
Re: sscanf admin command - by MummyKillerSLO - 25.05.2010, 16:23
Re: sscanf admin command - by Jonni8 - 25.05.2010, 16:39
Re: sscanf admin command - by Niixie - 25.05.2010, 16:52
Re: sscanf admin command - by Jonni8 - 25.05.2010, 17:16
Re: sscanf admin command - by Niixie - 25.05.2010, 17:40
Re: sscanf admin command - by Jonni8 - 25.05.2010, 17:46
Re: sscanf admin command - by Sergei - 25.05.2010, 17:53
Re: sscanf admin command - by Jonni8 - 25.05.2010, 18:08
Re: sscanf admin command - by MummyKillerSLO - 25.05.2010, 19:24

Forum Jump:


Users browsing this thread: 1 Guest(s)