SA-MP Forums Archive
/exit does not work in .3 - 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: /exit does not work in .3 (/showthread.php?tid=106684)



/exit does not work in .3 - mprofitt - 04.11.2009

Can anyone explain why /exit doesn't work or maybe how to make it work?

Код:
public OnPlayerCommandText(playerid,cmdtext[])
{
   dcmd(exit,4,cmdtext);
}

dcmd_exit(playerid,params[])
{
   CODE
   return 1;
}



Re: /exit does not work in .3 - mprofitt - 04.11.2009

Код:
public OnPlayerCommandText(playerid,cmdtext[])
{
   dcmd(exit,4,cmdtext);
   return 1;
}

dcmd_exit(playerid,params[])
{
   print(" /exit function called.");
   return 1;
}
Nothing printed to server_log.txt or the console.


Re: /exit does not work in .3 - mprofitt - 05.11.2009

Quote:
Originally Posted by mprofitt
Код:
public OnPlayerCommandText(playerid,cmdtext[])
{
  dcmd(exit,4,cmdtext);
  return 1;
}

dcmd_exit(playerid,params[])
{
  print(" /exit function called.");
  return 1;
}
Nothing printed to server_log.txt or the console.
This is an update....

I changed "exit" to "ex" and it works fine. Why the difference?


Re: /exit does not work in .3 - ModernRP - 05.11.2009

I've got the same problem, if u fixed it please reply or PM me, PLEASE


Re: /exit does not work in .3 - ModernRP - 05.11.2009

Код:
	if(strcmp(cmd, "/exit", true) == 0)
	{
 		for(new i = 0; i < sizeof(Houses); i++)
		{
			if (PlayerToPoint(3.0, playerid,Houses[i][ExitX], Houses[i][ExitY], Houses[i][ExitZ]))
			{
  				if(GetPlayerVirtualWorld(playerid) == i)
			  {
			    if(Houses[i][Locked] == 0 || PlayerInfo[playerid][pAdmin] >= 1)
					{
						SetPlayerInterior(playerid,Houses[i][EnterInterior]);
						SetPlayerPos(playerid,Houses[i][EnterX],Houses[i][EnterY],Houses[i][EnterZ]);
						SetPlayerVirtualWorld(playerid,Houses[i][EnterWorld]);
						SetPlayerFacingAngle(playerid,Houses[i][EnterAngle]);
					}
					else
					{
						GameTextForPlayer(playerid, "~r~Door Locked", 5000, 1);
					}
				}
			}
		}
		for(new i = 0; i < sizeof(Building); i++)
		{
			if (PlayerToPoint(3, playerid,Building[i][ExitX], Building[i][ExitY], Building[i][ExitZ]))
			{
			  if(GetPlayerVirtualWorld(playerid) == i)
			  {
					if(Building[i][Locked] == 0 || PlayerInfo[playerid][pAdmin] >= 1)
					{
						SetPlayerInterior(playerid,Building[i][EnterInterior]);
						SetPlayerVirtualWorld(playerid,Building[i][EnterWorld]);
						SetPlayerPos(playerid,Building[i][EnterX],Building[i][EnterY],Building[i][EnterZ]);
						SetPlayerFacingAngle(playerid,Building[i][EnterAngle]);
					}
					else
					{
						GameTextForPlayer(playerid, "~r~Door Locked", 5000, 1);
					}
				}
			}
		}
 		for(new i = 0; i < sizeof(Businesses); i++)
		{
			if (PlayerToPoint(3, playerid,Businesses[i][ExitX], Businesses[i][ExitY], Businesses[i][ExitZ]))
			{
			  if(GetPlayerVirtualWorld(playerid) == i)
			  {
					if(Businesses[i][Locked] == 0 || PlayerInfo[playerid][pAdmin] >= 1)
					{
						SetPlayerInterior(playerid,Businesses[i][EnterInterior]);
						SetPlayerVirtualWorld(playerid,Businesses[i][EnterWorld]);
						SetPlayerPos(playerid,Businesses[i][EnterX],Businesses[i][EnterY],Businesses[i][EnterZ]);
						SetPlayerFacingAngle(playerid,Businesses[i][EnterAngle]);
					}
					else
					{
						GameTextForPlayer(playerid, "~r~Door Locked", 5000, 1);
					}
				}
			}
		}
Somthing wrong in it? I can't find anything ..