SA-MP Forums Archive
None of MY cmds are working suddenly - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: None of MY cmds are working suddenly (/showthread.php?tid=142463)



None of MY cmds are working suddenly - KDlivest954 - 18.04.2010

Commands from filterscripts i've downloaded are working. But None of the ones i make are working, even in filterscripts i've made. A similar problem to this occured previously but with cars, none of them showed up on my sever.

anyway my code is:

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(strcmp(cmdtext, "/help", true, 10) == 0)
	{
	  SendClientMessage(playerid, 0xAA33AA33, "This is a gang war server. There are 5 groups[Cops, SBA, Grove, Ballas, Vagos, Aztecs]. For commands type /cmds.");
		return 1;
	}
  	if(strcmp(cmdtext, "/sgt", true, 10) == 0)
	{
		new Float:X, Float:Y, Float:Z;
		GetPlayerPos(playerid, X, Y, Z);
		CreateVehicle(522, X, Y, Z, 0, 0, 1, 0);
		return 1;
	}

	if(strcmp(cmdtext, "/kill", true, 10) == 0)
	{
	  SetPlayerHealth(playerid, 0);
		return 1;
	}

	if(strcmp(cmdtext, "/admin", true) == 0)
	{
  		ShowMenuForPlayer(Admin, playerid);
		return 1;
	}
  if(strcmp(cmdtext, "/cmds", true) == 0)
	{
  	SendClientMessage(playerid, 0x33AA33AA, "/kill || /admin || /rankinfo || /myrank");
  	return 1;
  }
	return 1;
}
this is in my GM. they stopped working after I copy and pasted the /sgt command 3 times to make more spwanable cars. I tried to test and it didnt work. does anyone no whats wrong with this?



Re: None of MY cmds are working suddenly - ineoncore - 18.04.2010

try to delete all the FS from server.cfg if it dose work turn on one by one and if you see witch one made the erreo dont use it


Re: None of MY cmds are working suddenly - aircombat - 18.04.2010

Quote:
Originally Posted by ineoncore
try to delete all the FS from server.cfg if it dose work turn on one by one and if you see witch one made the erreo dont use it
nop it isn't he just didn't put a return 0; at the end of OnPlayerCommandText

Topic Poster : it should be like this :


Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(strcmp(cmdtext, "/help", true, 10) == 0)
	{
	  SendClientMessage(playerid, 0xAA33AA33, "This is a gang war server. There are 5 groups[Cops, SBA, Grove, Ballas, Vagos, Aztecs]. For commands type /cmds.");
		return 1;
	}
  	if(strcmp(cmdtext, "/sgt", true, 10) == 0)
	{
		new Float:X, Float:Y, Float:Z;
		GetPlayerPos(playerid, X, Y, Z);
		CreateVehicle(522, X, Y, Z, 0, 0, 1, 0);
		return 1;
	}

	if(strcmp(cmdtext, "/kill", true, 10) == 0)
	{
	  SetPlayerHealth(playerid, 0);
		return 1;
	}

	if(strcmp(cmdtext, "/admin", true) == 0)
	{
  		ShowMenuForPlayer(Admin, playerid);
		return 1;
	}
  if(strcmp(cmdtext, "/cmds", true) == 0)
	{
  	SendClientMessage(playerid, 0x33AA33AA, "/kill || /admin || /rankinfo || /myrank");
  	return 1;
  }
	return 0;
}



Re: None of MY cmds are working suddenly - KDlivest954 - 18.04.2010

i've tried the return 0 one and that didnt work but i think it maybe a map filterscript for an island thats interferring. so ill try that. thanks.