AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Restricting CT's from buying in Shop (https://forums.alliedmods.net/showthread.php?t=114093)

wrecked_ 01-01-2010 19:05

Restricting CT's from buying in Shop
 
Alright, so I'm editing xPaw's HnS Shop for my server and I'm implementing an awp. I need to restrict the counter terrorists from being able to buy the awp when they type /vgshop(/hnsshop). At the moment I have
Code:

// My Attempt at restricting AWPs to CT's.
  if(CS_TEAM(id) == 2) {
    ColorChat(id, BLUE, "^x04[Vengeful Gaming Shop]^x01 This item is restricted to CTs!");
    return PLUGIN_HANDLED;
  }

I'm very aware that this coding is wrong, and I'd appreciate it if anyone would be kind enough as to help me with this block.

Thanks,
wrecked

crazyeffect 01-01-2010 19:10

Re: Restricting CT's from buying in Shop
 
Sure it's necessary? ^^

benamo6 01-01-2010 19:22

Re: Restricting CT's from buying in Shop
 
here you have
PHP Code:

if(get_user_team == 2
{
      
wathever you want



wrecked_ 01-01-2010 19:27

Re: Restricting CT's from buying in Shop
 
Ahah, I believe so, crazy.

Thanks for the code. +k

-wrecked

crazyeffect 01-01-2010 19:36

Re: Restricting CT's from buying in Shop
 
Karma is gone, lol

wrecked_ 01-01-2010 21:50

Re: Restricting CT's from buying in Shop
 
rofl I posted the reply then realized there was no karma button. Figured nobody would say anything. :mrgreen:


All times are GMT -4. The time now is 04:16.

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