Raised This Month: $ Target: $400
 0% 

Noclip and weapons


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
thomas_rox3
Junior Member
Join Date: Jan 2006
Old 04-06-2006 , 21:07   Noclip and weapons
Reply With Quote #1

I want to make a plugin that gives the CT's elites and gives the T's noclip. It's for a game some kids in my serevr came up with in my server they call it Sharks and Minnos and it kinda gets tireing of haveing to give them guns and turn off noclip each round. I want I just need to know the basics on how to do this because this will b my first plugin
thomas_rox3 is offline
Send a message via MSN to thomas_rox3
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 04-06-2006 , 21:23  
Reply With Quote #2

look at other plugins that do the same thing and copy the code.
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
thomas_rox3
Junior Member
Join Date: Jan 2006
Old 04-06-2006 , 21:35  
Reply With Quote #3

Ive looked but seeing as I am a noob to this kind of stuff Im not to sure how to make it set the weaps or the noclip at all .

as you can see Im not very far DX
Code:
#include <amxmodx> #include <amxmisc> #include <fun> #include <engine> #include <cstrike> #define PLUGIN "Sharks and Minnos" #define VERSION "Beta" #define AUTHOR "*[9mm]* Thomas" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_concmd("amx_snm","admin_snm",ADMIN_LEVEL_C) } public admin_smn(id,level)     {     if ( !cmd_access(id,level,cid,3) )         return PLUGIN_HANDLED                 give_item(id,"weapon_elite")         give_item(id,"ammo_9mm")         give_item(id,"ammo_9mm")         give_item(id,"ammo_9mm")         give_item(id,"ammo_9mm")         give_item(id,"ammo_9mm")         give_item(id,"ammo_9mm")         give_item(id,"ammo_9mm")         give_item(id,"ammo_9mm")
How do I set the elites to the CT's and I know to give noclip it's set_user_noclip right? and how would I make it add to T's.


I couldn't find any plugins that preform a similar opperation



I figured this was how you would set it to the teams with CS_TEAM_CT or CS_TEAM_T

Code:
#include <amxmodx> #include <amxmisc> #include <fun> #include <engine> #include <cstrike> #define PLUGIN "Sharks and Minnos" #define VERSION "Beta" #define AUTHOR "*[9mm]* Thomas" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_concmd("amx_snm","admin_snm",ADMIN_LEVEL_C) } public admin_smn(id,level)     {     if ( !cmd_access(id,level,cid,3) )         return PLUGIN_HANDLED                 give_item(CS_TEAM_CT,"weapon_elite")         give_item(CS_TEAM_CT,"ammo_9mm")         give_item(CS_TEAM_CT,"ammo_9mm")         give_item(CS_TEAM_CT,"ammo_9mm")         give_item(CS_TEAM_CT,"ammo_9mm")         give_item(CS_TEAM_CT,"ammo_9mm")         give_item(CS_TEAM_CT,"ammo_9mm")         give_item(CS_TEAM_CT,"ammo_9mm")         give_item(CS_TEAM_CT,"ammo_9mm")                 set_user_noclip(CS_TEAM_T)     }
thomas_rox3 is offline
Send a message via MSN to thomas_rox3
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 04-06-2006 , 21:59  
Reply With Quote #4

I'm working on something else right now but I could probably make this pretty easily, maybe this weekend. You should explain what you are looking for better though. Should be automatic until you turn it off, or do you want to have to enable it every round? Need to know things like that, every little detail.
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 04-06-2006 , 22:02  
Reply With Quote #5

Code:
#include <amxmodx> #include <amxmisc> #include <fun> #include <cstrike> new PLUGIN[] = "Sharks and Minnos" new VERSION[] = "Beta" new AUTHOR[] ="*[9mm]* Thomas" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_concmd("amx_snm","admin_snm",ADMIN_LEVEL_C,"<target> - gives items for sharks & minnows") } public admin_smn(id,level,cid) {     if ( !cmd_access(id,level,cid,2) )         return PLUGIN_HANDLED         new szArg[33]     read_argv(1,szArg,32)         new iTarget = cmd_target(id,szArg,1)     if(!iTarget)         return PLUGIN_HANDLED             new CsTeams:csTeam = cs_get_user_team(iTarget)         if(csTeam == CS_TEAM_CT)     {         give_item(id,"weapon_elite")         give_item(id,"ammo_9mm")         give_item(id,"ammo_9mm")         give_item(id,"ammo_9mm")         give_item(id,"ammo_9mm")         give_item(id,"ammo_9mm")         give_item(id,"ammo_9mm")         give_item(id,"ammo_9mm")         give_item(id,"ammo_9mm")     }     else if(csTeam == CS_TEAM_T)         set_user_noclip(iTarget,1)             client_print(id,print_console,"User set for game.")         return PLUGIN_HANDLED }
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
thomas_rox3
Junior Member
Join Date: Jan 2006
Old 04-06-2006 , 22:07  
Reply With Quote #6

Hawk to me that looks like it would only give the T's noclip if there wasn't and CT's am I right?

The basis of the plugins is The CT's are sharks and the T's are Minnos they Minnos have to try and kill the sharks before the sharks pistol wip them thats basically the basis of it
thomas_rox3 is offline
Send a message via MSN to thomas_rox3
johnjg75
Veteran Member
Join Date: Mar 2004
Location: Delaware
Old 04-06-2006 , 22:07  
Reply With Quote #7

If you want it to do it automatically at the beginning of each round, then do this:
Code:
#include <amxmodx> #include <amxmisc> #include <fun> #include <cstrike> new PLUGIN[] = "Sharks and Minnos" new VERSION[] = "Beta" new AUTHOR[] ="*[9mm]* Thomas" public plugin_init()   {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_event("HLTV","nRound","a","1=0","2=0") } public nRound() {           for(new iTarget=0;iTarget<33;iTarget++)     {     new CsTeams:csTeam = cs_get_user_team(iTarget)           if(csTeam == CS_TEAM_CT)     {         give_item(iTarget,"weapon_elite")         give_item(iTarget,"ammo_9mm")         give_item(iTarget,"ammo_9mm")         give_item(iTarget,"ammo_9mm")         give_item(iTarget,"ammo_9mm")         give_item(iTarget,"ammo_9mm")         give_item(iTarget,"ammo_9mm")         give_item(iTarget,"ammo_9mm")         give_item(iTarget,"ammo_9mm")     }     if(csTeam == CS_TEAM_T)         set_user_noclip(iTarget,1)      }           return PLUGIN_HANDLED }
__________________
johnjg75 is offline
Send a message via AIM to johnjg75 Send a message via MSN to johnjg75 Send a message via Yahoo to johnjg75
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 04-06-2006 , 22:08  
Reply With Quote #8

Quote:
Originally Posted by thomas_rox3
Hawk to me that looks like it would only give the T's noclip if there wasn't and CT's am I right?

The basis of the plugins is The CT's are sharks and the T's are Minnos they Minnos have to try and kill the sharks before the sharks pistol wip them thats basically the basis of it
It does exactly what you said in your first post. Try it.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
thomas_rox3
Junior Member
Join Date: Jan 2006
Old 04-06-2006 , 22:15  
Reply With Quote #9

So Hawk I want it to reset the round then set both of those at the same time how would that b done?
thomas_rox3 is offline
Send a message via MSN to thomas_rox3
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 04-06-2006 , 22:25  
Reply With Quote #10

Oh, you want to do it on everyone?

Here, use @ALL as the target:

Code:
#include <amxmodx> #include <amxmisc> #include <fun> #include <cstrike> new PLUGIN[] = "Sharks and Minnos" new VERSION[] = "Beta" new AUTHOR[] ="*[9mm]* Thomas" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_concmd("amx_snm","admin_snm",ADMIN_LEVEL_C,"<target> - gives items for sharks & minnows") } public admin_smn(id,level,cid) {     if ( !cmd_access(id,level,cid,2) )         return PLUGIN_HANDLED         new szArg[33]     read_argv(1,szArg,32)     if(equali(szArg,"@ALL"))     {         server_cmd("mp_restartround 1")         set_task(1.5,"fnDoAll")         return PLUGIN_HANDLED     }         new iTarget = cmd_target(id,szArg,1)     if(!iTarget)         return PLUGIN_HANDLED             new CsTeams:csTeam = cs_get_user_team(iTarget)         if(csTeam == CS_TEAM_T)     {         give_item(id,"weapon_elite")         give_item(id,"ammo_9mm")         give_item(id,"ammo_9mm")         give_item(id,"ammo_9mm")         give_item(id,"ammo_9mm")         give_item(id,"ammo_9mm")         give_item(id,"ammo_9mm")         give_item(id,"ammo_9mm")         give_item(id,"ammo_9mm")     }     else if(csTeam == CS_TEAM_CT)         set_user_noclip(iTarget,1)             client_print(id,print_console,"User set for game.")         return PLUGIN_HANDLED }     public fnDoAll() {     new iPlayers[32],iPlayersnum,CsTeams:csTeam,iPlayer     get_players(iPlayers,iPlayersnum,"a")         for(new iCount = 0;iCount < iPlayersnum;iCount++)     {         iPlayer = iPlayers[iCount]         csTeam = cs_get_user_team(iPlayer)         if(csTeam == CS_TEAM_T)             set_user_noclip(iPlayer,1)         else if(csTeam == CS_TEAM_CT)         {             give_item(iPlayer,"weapon_elite")             give_item(iPlayer,"ammo_9mm")             give_item(iPlayer,"ammo_9mm")             give_item(iPlayer,"ammo_9mm")             give_item(iPlayer,"ammo_9mm")             give_item(iPlayer,"ammo_9mm")             give_item(iPlayer,"ammo_9mm")             give_item(iPlayer,"ammo_9mm")             give_item(iPlayer,"ammo_9mm")         }     } }
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
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 16:37.


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