something broke
#1

i have a FS i made but no matter witch command i type in it dose /hydra. i.e /GMX spawns you a hydra, its ment to restart the server!
code or http://pastebin.com/f2100c1ef
EDIT:Just found out no matter what you put in it spawns a hydra!!!
Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#include <a_samp>
//-----------------------------------------------
public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Commands by Kylebrown 2009");
	print("--------------------------------------\n");
	return 1;
}


//---------------------------------------------------
public OnPlayerCommandText(playerid, cmdtext[])
{
	new cmd[256];
	new string[256];
	new giveplayerid;
	
//	if (strcmp("/mycommand", cmdtext, true, 10) == 0)
//	{
//		// Do something here
//		return 1;
//	}
	
	if(strcmp(cmd, "/Hydra", true) == 0)
	{
		new Float:x, Float:y, Float:z;
	  GetPlayerPos(playerid, x, y, z);
	  PutPlayerInVehicle(playerid,CreateVehicle(520, x, y, z, 82.2873, 0, 1, 0),0);
		SendClientMessageToAll(COLOR_YELLOW, "One Hydra :) Happy Flying");
	  return 1;
	}

	if(strcmp(cmd, "/GMX", true) == 0)
	{
		if(IsPlayerAdmin(playerid))
			{
			new name[MAX_PLAYER_NAME];
			GetPlayerName(playerid, name, sizeof(name));
			format(string, sizeof(string), "!!!!!%s RESTARTED THE SERVER!!!!!!", name);
			SendClientMessageToAll(COLOR_YELLOW, string);
	  	SendRconCommand("gmx");
			}
		else {
		format(string, sizeof(string), "Your NOT an ADMIN, YOU have NO rights!.", giveplayerid);
		SendClientMessage(playerid, COLOR_YELLOW, string);
		}
		return 1;
	}
	return 0;
}
//---------------------------------------------------------------
public OnFilterScriptExit()
{
	return 1;
}
Reply


Messages In This Thread
something broke - by kylebrown - 09.12.2009, 23:04
Re: something broke - by Mikep. - 09.12.2009, 23:42
Re: something broke - by kylebrown - 09.12.2009, 23:53
Re: something broke - by Mikep. - 09.12.2009, 23:55
Re: something broke - by kylebrown - 10.12.2009, 00:02

Forum Jump:


Users browsing this thread: 1 Guest(s)