#5

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
Reply


Messages In This Thread
shop - by sggassasin - 29.07.2009, 15:05
Re: shop - by Correlli - 29.07.2009, 15:12
Re: shop - by sggassasin - 29.07.2009, 15:17
Re: shop - by Criss_Angel - 29.07.2009, 15:38
Re: shop - by sggassasin - 29.07.2009, 16:27
Re: shop - by sggassasin - 30.07.2009, 00:56
Re: shop - by sggassasin - 30.07.2009, 04:24
Re: shop - by Correlli - 30.07.2009, 04:30
Re: shop - by sggassasin - 30.07.2009, 04:32
Re: shop - by pagie1111 - 30.07.2009, 05:43

Forum Jump:


Users browsing this thread: 2 Guest(s)