SA-MP Forums Archive
shop - 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: shop (/showthread.php?tid=88915)



shop - sggassasin - 29.07.2009

hi there i was woundering if someone could help me with something

i whant so if i walk into a store there is a red cercale i can walk into and then a menu comes up with like

1 ********
2***********
3*
4
5
6
7
8
9
10
exsetra
and so on and the only way that they can get one of these things is to stand in the marker and type 1 or 2 or 3 (and so on) thx for your help


Re: shop - Correlli - 29.07.2009

You should ask in script request topic.


Re: shop - sggassasin - 29.07.2009

i do ask but no one replys so like i need help


Re: shop - Criss_Angel - 29.07.2009

Quote:
Originally Posted by sggassasin
i do ask but no one replys so like i need help
Try this

On Top Of Script:
Код:
new Shop; // or what ever u want the red circle name to be!
then OnGameInit:

Код:
Shop == CreateCheckpoint(model,type,X,Y,Z); // im not sure about this :/
then OnPlayerEnterCheckpoint:

Код:
if(Checkpointid == Shop) // change the Shop to your preffered name
{
SendClientMessage(playerid,yourcolor,"1. turkey"); 
SendClientMessage(playerid,yourcolor,"2. Beef"); 
}
return 1;
You can change what i write into whatever you want


Re: shop - sggassasin - 29.07.2009

i whanted something like this



Код:
see i need something like this ....


// this is for just makeing the menu come up :) lol so much work :P
Код:
//top of script
Forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
Forward shops(playerid);
new Menu:shopsmenu;
new Menu:CurrentMenu = GetPlayerMenu(playerid);
Код:
// ongamemodeint
SetPlayerCheckpoint(playerid, x,y,z);
shopsmenu = CreateMenu("shopsmenu", 2, x,y,z);
Код:
//new (at bottem of script)
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
	new Float:oldposx, Float:oldposy, Float:oldposz;
	new Float:tempposx, Float:tempposy, Float:tempposz;
	GetPlayerPos(playerid, oldposx, oldposy, oldposz);
	tempposx = (oldposx -x);
	tempposy = (oldposy -y);
	tempposz = (oldposz -z);
	if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
	{
		return 1;
	}
	return 0;

publick shops (playerid)
if (PlayerToPoint(3.0, playerid,x,y,z)) {
 ShowMenuForPlayer(shopmenu,playerid);
 }
 return 1;
}
ok thats to bring up the menu

Код:
// this is to set the menu

AddMenuItem(teleportmenu, 0, "1. 5 seeds");
AddMenuItem(teleportmenu, 0, "2. condom");
AddMenuItem(teleportmenu, 0, "3. deer trap");
AddMenuItem(teleportmenu, 0, "4. hunting license");
AddMenuItem(teleportmenu, 0, "5. fishing license");
AddMenuItem(teleportmenu, 0, "6. something ...");

if(CurrentMenu == teleportmenu)
{
  switch(row)
  {
    case 0: 
    {
      
    }
    case 1: 
    {
      
    }
    case 2: 
    {
      
    }
    case 3: 
    {
      
    }
    case 4: 
    {
      
    }
    case 5: 
    {
      
    }
  }
}
ok i dont think this would work


Re: shop - sggassasin - 30.07.2009

*cough*


Re: shop - sggassasin - 30.07.2009

*cough* *cough*


Re: shop - Correlli - 30.07.2009

Stop bumping.


Re: shop - sggassasin - 30.07.2009

well i relly need help


Re: shop - pagie1111 - 30.07.2009

http://forum.sa-mp.com/index.php?topic=73648.0