AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Noclip and weapons (https://forums.alliedmods.net/showthread.php?t=26661)

thomas_rox3 04-06-2006 21:07

Noclip and weapons
 
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

jtp10181 04-06-2006 21:23

look at other plugins that do the same thing and copy the code.

thomas_rox3 04-06-2006 21:35

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)     }

jtp10181 04-06-2006 21:59

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.

Hawk552 04-06-2006 22:02

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 }

thomas_rox3 04-06-2006 22:07

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

johnjg75 04-06-2006 22:07

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 }

Hawk552 04-06-2006 22:08

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.

thomas_rox3 04-06-2006 22:15

So Hawk I want it to reset the round then set both of those at the same time how would that b done?

Hawk552 04-06-2006 22:25

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")         }     } }


All times are GMT -4. The time now is 16:37.

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