Raised This Month: $ Target: $400
 0% 

just a LITTLE BIT MORE PLEASE


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
iHaxor.Stan
BANNED
Join Date: Jul 2007
Old 07-08-2007 , 22:10   just a LITTLE BIT MORE PLEASE
Reply With Quote #1

Lol, I know I've been asking for help a lot today, but it's because I'm new to coding and I really want to learn!
Well, now I'm at a point in my plugin where I need to make the following happen for players:
  • Strip All Weapons On New Round (except knife)
I also need to know how to give:
  • Para/Elite to Terrorists On Round Start
  • Only Knife for CT's
Hmm.. Oh yes. I need to know how to make a cvar be able to control whether or not the plugin is on/off. And if the cvar is set to 1, the plugin activates. But if it's set to 0, ofcourse,nothing happens.
And also if it's set to 1, buying ANYTHING AT ALL is restricted for any player in the game.
^^(I know I can search and find how to make the plugin have a cvar to turn on/off, but I needed it more advanced (restrict buying) so if you could just tell me I'd appreciate it greatly!)

And also. I don't want the CT's to be able to pick up the T's guns if they kill a terrorist. So I am very needy for something that makes CT's drop guns as soon as they pick them up. Like the awp restricter plugin


Anything you could help with (that i said above) will be so much appreciated!!
This is too much I know, but I assure you, you'll be recieving lots of credit and karma



EDIT: Aw man I almost forgot! I'm making the T's glow red with
Code:
set_user_rendering(id,kRenderFxGlowShell,255,0,0,kRenderNormal,20)
For the CT's I dont want them to glow. I want them 80% invisible. I know it's possible by doing something with that code above, but I'm not sure how
Thx

Last edited by iHaxor.Stan; 07-08-2007 at 22:13.
iHaxor.Stan is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-08-2007 , 22:18   Re: just a LITTLE BIT MORE PLEASE
Reply With Quote #2

iHaxor : Try to search a little before posting.

Go here : http://www.amxmodx.org/funcwiki.php .
And search the function where you need some help. ;)
You'll find function's description.

To strip weapons, see : strip_user_weapons()
To give item, see give_item()

See rendor modes for set_user_rendering().
__________________

Last edited by Arkshine; 07-08-2007 at 22:22.
Arkshine is offline
iHaxor.Stan
BANNED
Join Date: Jul 2007
Old 07-08-2007 , 22:27   Re: just a LITTLE BIT MORE PLEASE
Reply With Quote #3

I know I know, but all that is so confusing trying to read. I learn a LOT quicker by examples, hah
I searched on funcwiki for strip_user_weapons, and it doesn't really say how to use it. It just explains what it does. Which I know
iHaxor.Stan is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-08-2007 , 22:32   Re: just a LITTLE BIT MORE PLEASE
Reply With Quote #4

strip_user_weapons( id ) . id = player.

It strips all weapons (knife included I believe. You may have to give knife with give_item() after that.).


give_item( id, item[] ); see weapons name here : http://wiki.alliedmods.net/CS_Weapons_Information

example : give_item( id, "weapons_knife" ); give a knife to player.
__________________

Last edited by Arkshine; 07-08-2007 at 22:35.
Arkshine is offline
iHaxor.Stan
BANNED
Join Date: Jul 2007
Old 07-08-2007 , 22:38   Re: just a LITTLE BIT MORE PLEASE
Reply With Quote #5

so if I wanted to strip terrorist's weapons I'd just do:
Code:
switch(cs_get_user_team(id))
{
case CS_TEAM_T:
    {
    strip_user_weapons()
    }
}
See that's what I'm confused about... Is it right?
iHaxor.Stan is offline
Lee
AlliedModders Donor
Join Date: Feb 2006
Old 07-08-2007 , 23:12   Re: just a LITTLE BIT MORE PLEASE
Reply With Quote #6

Code:
new maxPlayers = get_maxplayers();     for(new i = 1; i <= maxPlayers; i++) {     if(!is_user_connected(i))     {         continue;     }             if(get_user_team(i) == CS_TEAM_T)     {         strip_user_weapons(i);         give_item(i, "weapon_knife");     } }

Last edited by Lee; 07-08-2007 at 23:15.
Lee is offline
iHaxor.Stan
BANNED
Join Date: Jul 2007
Old 07-09-2007 , 07:38   Re: just a LITTLE BIT MORE PLEASE
Reply With Quote #7

Jeez man thanks Sooo much you rock.
iHaxor.Stan is offline
iHaxor.Stan
BANNED
Join Date: Jul 2007
Old 07-09-2007 , 18:05   Re: just a LITTLE BIT MORE PLEASE
Reply With Quote #8

okay, I HAVE looked up register_logevent on funcwiki, but it still feels like reading a different language or something.
I am wanting to call the function for Round Start.
For round end, I am using:
Code:
register_logevent("roundEnd", 2, "1=Round_End");
+
public roundEnd()
{
// MY CODES
}
I need to know how to use register_logevent for round start instead of round end.
Yes I searched!! Sorry if I missed something!
iHaxor.Stan is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 07-09-2007 , 18:10   Re: just a LITTLE BIT MORE PLEASE
Reply With Quote #9

Code:
register_logevent("round_start", 2, "1=Round_Start")
;)
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
iHaxor.Stan
BANNED
Join Date: Jul 2007
Old 07-09-2007 , 18:14   Re: just a LITTLE BIT MORE PLEASE
Reply With Quote #10

+karma
thanks for going straight into the code, I learn better from examples rather than writing
iHaxor.Stan is offline
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:30.


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