AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Request plugin. (https://forums.alliedmods.net/showthread.php?t=166299)

zENK 09-01-2011 19:02

Request plugin.
 
I was looking for a simple weapon chance plugin that works 100%.

Weapons i want in it:

AWP with 1 bullet.
Deagle wiht 2 bullets.
Fiveseven with 3 Bullets.
Scout with 0 bullets.


Also. It would be awesome if someone could script a admin plugin like.. it says [ADMIN] infront of your name in the "in-game chat"

Example : [ADMIN] zENK : Hello and welcome to my server!

Or something like that!


ANTICHRISTUS 09-01-2011 20:36

Re: Request plugin.
 
search the keyword [ADMIN] in my posts.

ps. use normal characters please, we are not blind.

wickedd 09-02-2011 02:35

Re: Request plugin.
 
@ANTICHRISTUS

Why are you helping this idiot?

ANTICHRISTUS 09-02-2011 07:53

Re: Request plugin.
 
every newbie should have a chance I think.

drekes 09-02-2011 07:57

Re: Request plugin.
 
Quote:

Originally Posted by ANTICHRISTUS (Post 1546309)
every newbie should have a chance I think.

That's the spirit :)

@ op
Some tips for you to have more chance of people helping you.

- Don't write in all the colors of the rainbow or ridiculous font sizes.
A clean request is a good request.

- Try to make your describe as accurate as possible

- Know the rules. (Don't bump too early, ...)

If you keep these in mind you'll have a better chance of getting what you want.

ANTICHRISTUS 09-02-2011 11:11

Re: Request plugin.
 
Quote:

Originally Posted by drekes (Post 1546312)
That's the spirit :)

momo the knife-bot ?? damn :twisted: !!

MostwantedScript 09-02-2011 16:51

Re: Request plugin.
 
PHP Code:

#include <amxmodx>
#include <cstrike>
#include <fakemeta>
 
#define TASK_TIME 3.0
 
new gMsg_SayText;
new 
awp_ammofiveseven_ammodeagle_ammoscout_ammo;
 
public 
plugin_init()
{
         
register_plugin("Hidenseek wchance""1.0""Unknown?");
         
register_logevent("round_start"2"1=Round_Start");
 
         
awp_ammo register_cvar("WC_awp_ammo""1");
         
fiveseven_ammo register_cvar("WC_fiveseven_ammo""2");
         
deagle_ammo register_cvar("WC_50ae_ammo""1");
         
scout_ammo register_cvar("WC_762nato_ammo""0");
 
         
gMsg_SayText get_user_msgid("SayText");  
}
public 
round_start()
{
         
set_task(TASK_TIME"give_stuff");
}
public 
give_stuff()
{
         new 
players[32], num;
         
get_players(playersnum"ah");
 
         new 
player;
         new 
ammo;
 
         for(new 
0numi++)
         {
         
player players[i];
 
         if(
random_num(0100) <= 1)
         {
                 
ammo get_pcvar_num(awp_ammo);
                 
fm_give_item(player"weapon_awp");
 
                 
cs_set_weapon_ammo(fm_get_weapon_id(player"weapon_fiveseven"), ammo);
 
                 
print_green(player"The time has come use the awp well!"ammo);
 
                 new 
name[32];
                 
get_user_nameplayername32);
                 
print_green(0,"Important announcement! Watch out! %s just got the awp!"name);
         }
 
         if(
random_num(0100) <= 2)
         {
                 
ammo get_pcvar_num(fiveseven_ammo);
                 
fm_give_item(player"weapon_fiveseven");
 
                 
cs_set_weapon_ammo(fm_get_weapon_id(player"weapon_fiveseven"), ammo);
                 
print_green(player"Lucky you.. You got a fiveseven!");
         }
 
         if(
random_num(0100) <= 1)
         {
                
ammo get_pcvar_num(deagle_ammo);
                
fm_give_item(player"weapon_deagle");
 
                
cs_set_weapon_ammo(fm_get_weapon_id(player"weapon_deagle"), ammo);
                
print_green(player"Lucky you.. You got a deagle!");
         }
 
         if(
random_num(0100) <= 25)
         {
                
set_pev(playerpev_health125.0);
                
print_green(player"Lucky you.. You got a healthpack with 25HP!");
         }
 
         if(
random_num(0100) <= 6)
         {
                 
fm_give_item(player"weapon_smokegrenade");
                 
print_green(player"Lucky you.. You got a Frostnade!");
         }
 
         if(
random_num(0100) <= 70)
         {
                 
cs_set_user_armor(player100CS_ARMOR_VESTHELM);
                 
print_green(player"Lucky you.. You got a Kevlar and a Helmet!");
         }
 
         if(
random_num(0100) <= 10)
         {
                  
ammo get_pcvar_num(scout_ammo);
                  
fm_give_item(player"weapon_scout");
 
                  
cs_set_weapon_ammo(fm_get_weapon_id(player"weapon_scout"), ammo);
                  
print_green(player"Lucky you.. You got a Scout to jump and run faster!");
         }
 
         if(
random_num(0100) <= 10)
         {
                  
set_pev(playerpev_health200.0);
 
                  
print_green(player"Lucky you.. You got a healthpack with 100HP!");
         }
 
         if(
random_num(0100) <= 8)
         {
                  
fm_give_item(player"weapon_hegrenade");
                  
print_green(player"Lucky you.. You got a HE!");
         }        
    }
}
stock fm_give_item(index, const item[]) {
         if (!
equal(item"weapon_"7) && !equal(item"ammo_"5) && !equal(item"item_"5) && !equal(item"tf_weapon_"10))
         return 
0
 
         
new ent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocStringitem));
         if (!
pev_valid(ent))
             return 
0
 
         
new Float:origin[3]
         
pev(indexpev_originorigin)
         
set_pev(entpev_originorigin)
         
set_pev(entpev_spawnflagspev(entpev_spawnflags) | SF_NORESPAWN)
         
dllfunc(DLLFunc_Spawnent)
 
         new 
save pev(entpev_solid)
         
dllfunc(DLLFunc_Touchentindex)
         if (
pev(entpev_solid) != save)
             return 
ent
 
         engfunc
(EngFunc_RemoveEntityent)
 
         return -
1
}
stock fm_get_weapon_id(index, const weapon[])
{
         new 
ent = -1;
 
         while((
ent engfunc(EngFunc_FindEntityByStringent"classname"weapon)) != 0)
         {
              if(
index == pev(entpev_owner))
                  return 
ent;
         }
         return 
0;
}
stock print_green(id,const fmt[],{Float,_}:...) { //this is my stock btw ^^
         
if(id && !is_user_connected(id)) return 0
 
         
static buffer[192]
         
buffer[0] = '^x04'
         
vformat(buffer[1],190fmt,3)
 
         
message_begin(id MSG_ONE MSG_ALL,gMsg_SayText,{0,0,0},id)
         
write_byte(id)
         
write_string(buffer)
         
message_end()
 
         return 
1


Thats the wchance cant remember the "maker"

And heres a tag plugin you can use
Small description

Code:

ADMIN TAG = Immunity Acess
MEMBER TAG = Kick acess
VIP TAG = B acess

PHP Code:

#include <amxmodx> 
#include <amxmisc> 
#include <cstrike> 
#include <colorchat> 

new cTag[33] = 1

public 
plugin_init() 

    
register_plugin("Chat""1.0""Mostwanted"); 
    
register_clcmd("say""cmdsay"); 
    
register_clcmd("say_team""cmdteamsay"); 


public 
cmdsay(id

    new 
message[200], message2[200], holder[2], players[32], numname[32], atext[64]; 
    
read_argv(1message2199); 
    
strtok(message2holder1message199'!'); 
    
get_players(playersnum); 
    
get_user_name(idname31); 
     
    if(
access(idADMIN_IMMUNITY)) 
        
atext "[Admin]"
    else if(
access(idADMIN_KICK)) 
        
atext "[Member]"
    else if(
access(idADMIN_LEVEL_B)) 
        
atext "[VIP]"
     
    for(new 
inumi++) 
    { 
        if(
is_user_alive(id)) 
            if(
cTag[id] == 1
                
ColorChat(iGREEN"%s^x03 %s^x01 : %s"atextnamemessage); 
        else if(!
is_user_alive(id)) 
            if(
cTag[id] == 1
                
ColorChat(iGREEN"^x01*DEAD*^x04 %s^x03 %s : %s"atextnamemessage); 
    } 
    if(
cTag[id] == 1
        return 
PLUGIN_HANDLED
    else if(
cTag[id] == 0
        return 
PLUGIN_CONTINUE


public 
cmdteamsay(id

    new 
message[200], message2[200], holder[2], players[32], numname[32], atext[64], ttext[64]; 
    
read_argv(1message2199); 
    
strtok(message2holder1message199'!'); 
    
get_players(playersnum); 
    
get_user_name(idname31); 
     
    if(
access(idADMIN_IMMUNITY)) 
        
atext "[Admin]"
    else if(
access(idADMIN_KICK)) 
        
atext "[Member]"
    else if( 
access(idADMIN_LEVEL_B)) 
        
atext "[VIP]"
     
    if(
cs_get_user_team(id) == CS_TEAM_CT
        
ttext "(Counter-Terrorist)"
    else if(
cs_get_user_team(id) == CS_TEAM_T
        
ttext "(Terrorist)"
     
    for(new 
inumi++) 
    { 
        if(
is_user_alive(id
            if(
cTag[id] == 1
                if(
cs_get_user_team(i)) 
                    
ColorChat(iGREEN"^x01%s^x04 %s^x03 %s^x01 : %s"ttextatextnamemessage); 
        else if(!
is_user_alive(id)) 
            if(
cTag[id] == 1
                if(
cs_get_user_team(i)) 
                    
ColorChat(iGREEN"^x01*DEAD* %s^x04 %s^x03 %s^01 : %s"ttextatextnamemessage); 
    } 
    if(
cTag[id] == 1
        return 
PLUGIN_HANDLED
    else if(
cTag[id] == 0
        return 
PLUGIN_CONTINUE



zENK 09-02-2011 16:59

Re: Request plugin.
 
Quote:

Originally Posted by MostwantedScript (Post 1546685)
PHP Code:

#include <amxmodx>
#include <cstrike>
#include <fakemeta>
 
#define TASK_TIME 3.0
 
new gMsg_SayText;
new 
awp_ammofiveseven_ammodeagle_ammoscout_ammo;
 
public 
plugin_init()
{
         
register_plugin("Hidenseek wchance""1.0""Unknown?");
         
register_logevent("round_start"2"1=Round_Start");
 
         
awp_ammo register_cvar("WC_awp_ammo""1");
         
fiveseven_ammo register_cvar("WC_fiveseven_ammo""2");
         
deagle_ammo register_cvar("WC_50ae_ammo""1");
         
scout_ammo register_cvar("WC_762nato_ammo""0");
 
         
gMsg_SayText get_user_msgid("SayText");  
}
public 
round_start()
{
         
set_task(TASK_TIME"give_stuff");
}
public 
give_stuff()
{
         new 
players[32], num;
         
get_players(playersnum"ah");
 
         new 
player;
         new 
ammo;
 
         for(new 
0numi++)
         {
         
player players[i];
 
         if(
random_num(0100) <= 1)
         {
                 
ammo get_pcvar_num(awp_ammo);
                 
fm_give_item(player"weapon_awp");
 
                 
cs_set_weapon_ammo(fm_get_weapon_id(player"weapon_fiveseven"), ammo);
 
                 
print_green(player"The time has come use the awp well!"ammo);
 
                 new 
name[32];
                 
get_user_nameplayername32);
                 
print_green(0,"Important announcement! Watch out! %s just got the awp!"name);
         }
 
         if(
random_num(0100) <= 2)
         {
                 
ammo get_pcvar_num(fiveseven_ammo);
                 
fm_give_item(player"weapon_fiveseven");
 
                 
cs_set_weapon_ammo(fm_get_weapon_id(player"weapon_fiveseven"), ammo);
                 
print_green(player"Lucky you.. You got a fiveseven!");
         }
 
         if(
random_num(0100) <= 1)
         {
                
ammo get_pcvar_num(deagle_ammo);
                
fm_give_item(player"weapon_deagle");
 
                
cs_set_weapon_ammo(fm_get_weapon_id(player"weapon_deagle"), ammo);
                
print_green(player"Lucky you.. You got a deagle!");
         }
 
         if(
random_num(0100) <= 25)
         {
                
set_pev(playerpev_health125.0);
                
print_green(player"Lucky you.. You got a healthpack with 25HP!");
         }
 
         if(
random_num(0100) <= 6)
         {
                 
fm_give_item(player"weapon_smokegrenade");
                 
print_green(player"Lucky you.. You got a Frostnade!");
         }
 
         if(
random_num(0100) <= 70)
         {
                 
cs_set_user_armor(player100CS_ARMOR_VESTHELM);
                 
print_green(player"Lucky you.. You got a Kevlar and a Helmet!");
         }
 
         if(
random_num(0100) <= 10)
         {
                  
ammo get_pcvar_num(scout_ammo);
                  
fm_give_item(player"weapon_scout");
 
                  
cs_set_weapon_ammo(fm_get_weapon_id(player"weapon_scout"), ammo);
                  
print_green(player"Lucky you.. You got a Scout to jump and run faster!");
         }
 
         if(
random_num(0100) <= 10)
         {
                  
set_pev(playerpev_health200.0);
 
                  
print_green(player"Lucky you.. You got a healthpack with 100HP!");
         }
 
         if(
random_num(0100) <= 8)
         {
                  
fm_give_item(player"weapon_hegrenade");
                  
print_green(player"Lucky you.. You got a HE!");
         }        
    }
}
stock fm_give_item(index, const item[]) {
         if (!
equal(item"weapon_"7) && !equal(item"ammo_"5) && !equal(item"item_"5) && !equal(item"tf_weapon_"10))
         return 
0
 
         
new ent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocStringitem));
         if (!
pev_valid(ent))
             return 
0
 
         
new Float:origin[3]
         
pev(indexpev_originorigin)
         
set_pev(entpev_originorigin)
         
set_pev(entpev_spawnflagspev(entpev_spawnflags) | SF_NORESPAWN)
         
dllfunc(DLLFunc_Spawnent)
 
         new 
save pev(entpev_solid)
         
dllfunc(DLLFunc_Touchentindex)
         if (
pev(entpev_solid) != save)
             return 
ent
 
         engfunc
(EngFunc_RemoveEntityent)
 
         return -
1
}
stock fm_get_weapon_id(index, const weapon[])
{
         new 
ent = -1;
 
         while((
ent engfunc(EngFunc_FindEntityByStringent"classname"weapon)) != 0)
         {
              if(
index == pev(entpev_owner))
                  return 
ent;
         }
         return 
0;
}
stock print_green(id,const fmt[],{Float,_}:...) { //this is my stock btw ^^
         
if(id && !is_user_connected(id)) return 0
 
         
static buffer[192]
         
buffer[0] = '^x04'
         
vformat(buffer[1],190fmt,3)
 
         
message_begin(id MSG_ONE MSG_ALL,gMsg_SayText,{0,0,0},id)
         
write_byte(id)
         
write_string(buffer)
         
message_end()
 
         return 
1


Thats the wchance cant remember the "maker"

And heres a tag plugin you can use
Small description

Code:

ADMIN TAG = Immunity Acess
MEMBER TAG = Kick acess
VIP TAG = B acess

PHP Code:

#include <amxmodx> 
#include <amxmisc> 
#include <cstrike> 
#include <colorchat> 

new cTag[33] = 1

public 
plugin_init() 

    
register_plugin("Chat""1.0""Mostwanted"); 
    
register_clcmd("say""cmdsay"); 
    
register_clcmd("say_team""cmdteamsay"); 


public 
cmdsay(id

    new 
message[200], message2[200], holder[2], players[32], numname[32], atext[64]; 
    
read_argv(1message2199); 
    
strtok(message2holder1message199'!'); 
    
get_players(playersnum); 
    
get_user_name(idname31); 
     
    if(
access(idADMIN_IMMUNITY)) 
        
atext "[Admin]"
    else if(
access(idADMIN_KICK)) 
        
atext "[Member]"
    else if(
access(idADMIN_LEVEL_B)) 
        
atext "[VIP]"
     
    for(new 
inumi++) 
    { 
        if(
is_user_alive(id)) 
            if(
cTag[id] == 1
                
ColorChat(iGREEN"%s^x03 %s^x01 : %s"atextnamemessage); 
        else if(!
is_user_alive(id)) 
            if(
cTag[id] == 1
                
ColorChat(iGREEN"^x01*DEAD*^x04 %s^x03 %s : %s"atextnamemessage); 
    } 
    if(
cTag[id] == 1
        return 
PLUGIN_HANDLED
    else if(
cTag[id] == 0
        return 
PLUGIN_CONTINUE


public 
cmdteamsay(id

    new 
message[200], message2[200], holder[2], players[32], numname[32], atext[64], ttext[64]; 
    
read_argv(1message2199); 
    
strtok(message2holder1message199'!'); 
    
get_players(playersnum); 
    
get_user_name(idname31); 
     
    if(
access(idADMIN_IMMUNITY)) 
        
atext "[Admin]"
    else if(
access(idADMIN_KICK)) 
        
atext "[Member]"
    else if( 
access(idADMIN_LEVEL_B)) 
        
atext "[VIP]"
     
    if(
cs_get_user_team(id) == CS_TEAM_CT
        
ttext "(Counter-Terrorist)"
    else if(
cs_get_user_team(id) == CS_TEAM_T
        
ttext "(Terrorist)"
     
    for(new 
inumi++) 
    { 
        if(
is_user_alive(id
            if(
cTag[id] == 1
                if(
cs_get_user_team(i)) 
                    
ColorChat(iGREEN"^x01%s^x04 %s^x03 %s^x01 : %s"ttextatextnamemessage); 
        else if(!
is_user_alive(id)) 
            if(
cTag[id] == 1
                if(
cs_get_user_team(i)) 
                    
ColorChat(iGREEN"^x01*DEAD* %s^x04 %s^x03 %s^01 : %s"ttextatextnamemessage); 
    } 
    if(
cTag[id] == 1
        return 
PLUGIN_HANDLED
    else if(
cTag[id] == 0
        return 
PLUGIN_CONTINUE



I'm terrible at this. is that SMA and AMXX files?

Exolent[jNr] 09-02-2011 17:02

Re: Request plugin.
 
I already helped you in my Weapon Chance topic.
There is no need to rewrite another Weapon Chance plugin.

MostwantedScript 09-02-2011 17:07

Re: Request plugin.
 
Hard to copy then paste and name to yourname.sma?


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

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