Raised This Month: $ Target: $400
 0% 

Need help with plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 05-23-2007 , 09:48   Re: Need help with plugin
Reply With Quote #6

You do This:
Code:
public client_PreThink(id)
{
 if(!is_user_alive(id)) {
  PLUGIN_HANDLED
 }
 if(cs_get_user_team(id) == CS_TEAM_T) {
  set_user_maxspeed(id,500.0)
  new clip, ammo
  if(get_user_weapon(id,clip,ammo) != CSW_KNIFE || cs_get_user_shield(id))
  {
   strip_user_weapons(id)
   give_item(id,"weapon_knife")
  }
 }
 if(cs_get_user_team(id) == CS_TEAM_CT) {
  if(cs_get_user_nvg(id) == 1) {
   cs_set_user_nvg(id,0)
   cs_set_user_money(id,cs_get_user_money(id)+1250)
  }
 }
}
every player think...ca 60 times per second...why?

wouldn't it be better to do this if player spawns or also in roundstart?
Btw.: for the correct hook on rountstart see VENs tutorial :http://forums.alliedmods.net/showthread.php?t=42159
Very nice tut! ;)
__________________

Last edited by regalis; 05-23-2007 at 09:52.
regalis is offline
 



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 10:35.


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