Raised This Month: $ Target: $400
 0% 

Only teror


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
oei
Junior Member
Join Date: Nov 2011
Old 11-05-2011 , 10:50   Only teror
Reply With Quote #1

i need only teror can do this
this is code from my hns shop

PHP Code:
public menu1(idmenuitem)
{
 if (
item == MENU_EXIT){
  
menu_destroy(menu)
  return 
PLUGIN_HANDLED
 
}
 
 new 
Data[6];
 new 
Access;
 new 
Callback;
 new 
Name[64];
 
menu_item_getinfo(menuitemAccessData5Name63Callback)
 
 new 
Key str_to_num(Data);
 
 switch (
Key){
  case 
1:{
   if (!
is_user_alive(id))
   {
    return 
PLUGIN_HANDLED
   
}
   new 
cost get_pcvar_num(cost_deagle)
   
   if (
money[id] < cost){
    
ColorChat(id,"^1You don't have money to Deagle")
   }
   else{
    
ColorChat(id,"your buy Deagle"Name)
    
cs_set_weapon_ammo(give_item(id"weapon_deagle"), 1);
      }
  }
 }
 
menu_destroy(menu)
 return 
PLUGIN_HANDLED
}
  } 
oei is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-05-2011 , 10:54   Re: Only teror
Reply With Quote #2

PHP Code:
if ( cs_get_user_teamid ) != CS_TEAM_T )
   return 
PLUGIN_HANDLED 
__________________
Bugsy is offline
oei
Junior Member
Join Date: Nov 2011
Old 11-05-2011 , 11:09   Re: Only teror
Reply With Quote #3

Quote:
Originally Posted by Bugsy View Post
PHP Code:
if ( cs_get_user_teamid ) != CS_TEAM_T )
   return 
PLUGIN_HANDLED 
Where I put it in this code?
oei is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-05-2011 , 11:30   Re: Only teror
Reply With Quote #4

Use your brain a little. Think about where you want the block to occur.
__________________
Bugsy is offline
oei
Junior Member
Join Date: Nov 2011
Old 11-05-2011 , 11:37   Re: Only teror
Reply With Quote #5

i do this :

PHP Code:
   if(get_user_flags(id) & ADMIN_LEVEL_D)
   {
    
ColorChat(id,"You need be a Vip!"
    return 
PLUGIN_HANDLED;
   } 
And if i have in user.ini this flag i can not buy this and if i dont hav this flag i can buy this hoo i do only ho have the flag ADMIN_LEVEL_D can buy this ?
oei is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:19.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode