SendRconCommand unloadfs in CMD = SERVER CRASH
#1

OK, the problem i'm having is when i do /unloadfs [filterscript]... the server crashes. more specific it crashes when i do SendRconCommand("unloadfs filterscript"); in a command. not to sure why(hints why i'm here) searched the forums but i couldnt find others with this problem, maybe its my poor search i donno but if someone could help me with my problem it would be great on another note i have a simular(almost identical) command /reloadfs and it works just fine how ever i do get SERVER: UnKnown Command. as if it is returning 0 but i return 1; even tried returning the function. and still does it. however this is not my problem

And YES it does not crash if i use /rcon unloadfs [filterscript] so i'm ruling out that its the filterscripts fault

Код:
//using zcmd for commands as u can see
COMMAND:unloadfs(playerid,params[]) {
	if(!IsPlayerAble(playerid,CanRcon)){
		#pragma unused params
		return 0;
	}
	new tmp[256], Index; tmp = strtok(params,Index);
	if(!strlen(tmp)) return SendClientMessage(playerid,RED,"USAGE: /unloadfs [ScriptName]");
	new string[128];
	format(string, sizeof(string), "Unloading FilterScript %s", tmp);
	SendClientMessage(playerid,YELLOW, string);
	format(string, sizeof(string), "unloadfs %s", tmp);
	//inserted the below to see if it makes to the function with the proper command, it did
	SendClientMessage(playerid,YELLOW, string);
	SendRconCommand(string);
	//inserted this to see if it makes past above function, it dont
	SendClientMessage(playerid,YELLOW, "FAIL");
	return 1;
}
EDIT: I'm trying to unload the FS with this command in it.
just tested it unloads other FS's just fine,
guess i'll just make sure your not able to unload the filterscript containing the cmd, send message like USE RCON to unload this script!


ok w/e guess solved enough on my own. fail post -_- DELETE ME
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)