SA-MP Forums Archive
New problem: None of my GM cmds work - 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: New problem: None of my GM cmds work (/showthread.php?tid=141385)



New problem: None of my GM cmds work - KDlivest954 - 13.04.2010

none of them work. they were working fine till i copy and pasted a cmd 3 times(spawn cars.) now they dont work. only the one in the FS work.

Код:
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;
}
ps: I edited this post to avoid creating a new one. I hope thats ok.


Re: if(playername == ????) I need help with a cmd like that - IamNotKoolllll - 13.04.2010

u want it in quat an it wont work T_T


Re: if(playername == ????) I need help with a cmd like that - KDlivest954 - 13.04.2010

Quote:
Originally Posted by IamNotKoolllll
u want it in quat an it wont work T_T
What?


Re: if(playername == ????) I need help with a cmd like that - IamNotKoolllll - 13.04.2010

Quote:
Originally Posted by KDlivest954
Quote:
Originally Posted by IamNotKoolllll
u want it in quat an it wont work T_T
What?
itwontworkandintheredistheisueandymspacebarisntwor king


Re: if(playername == ????) I need help with a cmd like that - KDlivest954 - 13.04.2010

Quote:
Originally Posted by IamNotKoolllll
Quote:
Originally Posted by KDlivest954
Quote:
Originally Posted by IamNotKoolllll
u want it in quat an it wont work T_T
What?
itwontworkandintheredistheisueandymspacebarisntwor king
WELL DO YOU KNOW ANOTHER METHOD i could use instead of that??


Re: if(playername == ????) I need help with a cmd like that - IamNotKoolllll - 13.04.2010

Quote:
Originally Posted by KDlivest954
Quote:
Originally Posted by IamNotKoolllll
Quote:
Originally Posted by KDlivest954
Quote:
Originally Posted by IamNotKoolllll
u want it in quat an it wont work T_T
What?
itwontworkandintheredistheisueandymspacebarisntwor king
well u can try
admin[MAX_PLAYERS];
to set it use admin[playerid] = 0 -99999999;
to get from it ue ur if but with == intea

WELL DO YOU KNOW ANOTHER METHOD i could use instead of that??



Re: New problem: None of my GM cmds work - M4S7ERMIND - 13.04.2010

You need to return 0 if its a filterscript:
pawn Код:
//Filterscript
public OnPlayerCommandText(playerid, cmdtext[])
{
  return 0;
}
pawn Код:
//Gamemode
public OnPlayerCommandText(playerid, cmdtext[])
{
  return Ban(playerid); //Here you can return whatever you like
}



Re: New problem: None of my GM cmds work - xxjackoxx - 13.04.2010

Why did u return a final 1 should be 0 ?


Re: New problem: None of my GM cmds work - Jay420 - 13.04.2010

pawn Код:
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: New problem: None of my GM cmds work - KDlivest954 - 14.04.2010

Код:
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;
}
That's my new code. but i thinks its a pawno or pc problem cuz none of the commands i make whether it be filterscript or GM, they dont work. I have a FS for a ramp and thats not workin either....