SA-MP Forums Archive
[Help] 0.3 GUI Menu - 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: [Help] 0.3 GUI Menu (/showthread.php?tid=111462)



[Help] 0.3 GUI Menu - alex1a - 02.12.2009

I need a script, so that when I get to a particular coordinate, the server open the new 0.3 GUI menu with several options.
For example: I arrive at a certain coordinate in the bank and the menu appears, which you can choose: Banking, Extract ... etc ...

Example:


Cumps


Re: [Help] 0.3 GUI Menu - alex1a - 02.12.2009

Please Help me


Re: [Help] 0.3 GUI Menu - Zeromanster - 02.12.2009

On top of the script:

pawn Код:
forward CheckPlayerPos(playerid);
Under OnGameModeInit:

pawn Код:
SetTimer("CheckPlayerPos", 3000, 1);
At the end of your script:

pawn Код:
public CheckPlayerPos(playerid)
{
  IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z)
  {
    // The DialogShow code here.
  }
  return 1;
}



Re: [Help] 0.3 GUI Menu - alex1a - 02.12.2009

Thanks a lot


Re: [Help] 0.3 GUI Menu - pagie1111 - 02.12.2009

that will only work for ID 0:


this is what you do


pawn Код:
public CheckPlayerPos(playerid)
{
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
  if(IsPlayerInRangeOfPoint(i, Float:range, Float:x, Float:y, Float:z)
  {
    // The DialogShow code here.
  }
  return 1;
}
for every playerid you add change it to i