Raised This Month: $ Target: $400
 0% 

Blocking Flashlight For Terrorists Only (moved from Support/Help)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Paulster1022
Member
Join Date: Apr 2006
Old 07-10-2007 , 15:34   Re: Blocking Flashlight For Terrorists Only
Reply With Quote #1

I want the flashlight to work for Ct's only and block the flashlight for T's. This plugin is allowing both t's and ct's to use a flashlight. I just want Ct's with flashlight . I did change it to if(cs_get_user_team(player) == CS_TEAM_CT) but didnt help.
Code:
#include <amxmodx>
#include <engine>
#include <cstrike>
#include <fun>
 
#define PLUGIN "Terrorists are not allowed a flashlight"
#define VERSION "1.0"
#define AUTHOR "Amxmodx community"
 
new bool:can_impulse[32]
 
public plugin_init() {
 
 register_plugin(PLUGIN, VERSION, AUTHOR)
 register_logevent("round_start", 2, "1=Round_Start")
 
}
 
public round_start()
{
 new players[32], num
 get_players(players, num)
 
 new player
 for(new i = 0; i < num; i++)
 {
  player = players[i]
 
  if(cs_get_user_team(player) == CS_TEAM_CT)
  {
   can_impulse[player] = true
  }
 
  else
   return 1;
 }
 return 1;
}
 
public client_impulse(id,impulse)
{
 if(!can_impulse[id] && impulse == 100)
 {
  return 1;
 }
 return 0;
}
Paulster1022 is offline
Send a message via AIM to Paulster1022
Reply



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 21:32.


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