SA-MP Forums Archive
Stopping players from using modshops? - 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: Stopping players from using modshops? (/showthread.php?tid=115023)



Stopping players from using modshops? - Christopher. - 22.12.2009

Ok so heres my code:

Код:
public OnEnterExitModShop(playerid, enterexit, interiorid)
{
  if(enterexit == 1) return SendClientMessage(playerid, mError, "Error: You cannot use Modshops, You must earn your parts.");
  return 0;
}
I thought this would render the modshops unusable, But instead it just says the error message, Any help?.


Re: Stopping players from using modshops? - Abernethy - 22.12.2009

Quote:
Originally Posted by Chris - X-Host
Ok so heres my code:

Код:
public OnEnterExitModShop(playerid, enterexit, interiorid)
{
  if(enterexit == 1) return SendClientMessage(playerid, mError, "Error: You cannot use Modshops, You must earn your parts.");
  return 0;
}
I thought this would render the modshops unusable, But instead it just says the error message, Any help?.
Try removing the return in between your if statement and the function. It's returning the message only i believe.


Re: Stopping players from using modshops? - niCe - 22.12.2009

You can't disable modshops by returning false in the callback. This method works only in few callbacks such as OnPlayerText.

In case you want disable modshops, you will have to find another solution, e.g. placing objects in front of the garage so players can't enter it.