A filterscript to disable weapons.
#5

Quote:
Originally Posted by rubenejbr
View Post
Thanks alot.
Today i made a stunting gamemode.
But where do i put these lines ?

pawn Code:
public OnGameModeinit()
{
      // other code here
      return SetTimer("Disableweapons",5000,true);
}

forward Disableweapons();
public Disableweapons()
{
    for(new i; i<MAX_PLAYERS; i++)
    {
         ResetPlayerWeapons(i);
     }
      return 1;
}
You can just paste it into your script editor, it can be on any place BUT NOT in an existing callback. Also, if you've already defined OnGameModeInit, paste the Init code in that callback without the header (public OnGameModeInit())

Oh and, slight mistake in my code: Change OnGameModeinit to OnGameModeInit. Note the capitalized I.

@Vince: I know that you can use it till some point (when the code is too heavy and it will cause lagg), but I prefer to not use it in samples and other. Maybe the guy already has a shitload of OPU stuff. A few small things becomes a big thing. But you're right on that point - if he only uses this statement it would work perfectly.
Reply


Messages In This Thread
A filterscript to disable weapons. - by rubenejbr - 27.05.2012, 20:24
Re: A filterscript to disable weapons. - by Danny - 27.05.2012, 20:40
Re: A filterscript to disable weapons. - by Vince - 27.05.2012, 20:47
Re: A filterscript to disable weapons. - by rubenejbr - 28.05.2012, 12:49
Re: A filterscript to disable weapons. - by Danny - 28.05.2012, 13:03
Re: A filterscript to disable weapons. - by MP2 - 28.05.2012, 13:32
Re: A filterscript to disable weapons. - by rubenejbr - 06.06.2012, 06:52

Forum Jump:


Users browsing this thread: 1 Guest(s)