AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Can not have 2 weapons at the same time code inside. (https://forums.alliedmods.net/showthread.php?t=49183)

aim4lex 12-29-2006 07:07

Can not have 2 weapons at the same time code inside.
 
Hey guys, i need some help with this plugin "Every admin with flag F automaticly getting extra scout, but there is one problem, i can not have another gun when this plugin active, it just gives me scout, when i bought another weapon , my scout dissapire.Could you help me with it so i could use both weapon scout + any other weapon that im bought. Thanks.

Code:

#include <amxmodx>
#include <amxmisc>
#include <fun>
#define PLUGIN "Give Admin m3"
#define VERSION "1.0"
#define AUTHOR "The Specialist"
#define MAX_PLAYERS  32
new bool:g_restart_attempt[MAX_PLAYERS + 1];
new g_Switch;
public plugin_init()
 {
 register_plugin(PLUGIN, VERSION, AUTHOR)
 g_Switch = register_cvar("admin_give_scout","1");
 register_event("ResetHUD", "event_hud_reset", "be");
 register_clcmd("fullupdate", "clcmd_fullupdate") ;
 register_event("TextMsg", "event_restart_attempt", "a", "2=#Game_will_restart_in");
}
public clcmd_fullupdate()
{
 return 1;
}
public event_restart_attempt()
{
 new players[32], num;
 get_players(players, num, "a");
 
 for (new i; i < num; ++i)
 {
  g_restart_attempt[players[i]] = true;
 }
}
public event_hud_reset(id)
{
 if (g_restart_attempt[id])
 {
  g_restart_attempt[id] = false;
  return;
 }
 event_player_spawn(id)
}
public event_player_spawn(id)
{
 if(get_pcvar_num(g_Switch) &&( get_user_flags(id) & ADMIN_LEVEL_F))
 {
  give_item(id,"weapon_scout");
  return 0;
 }
 return 1;
}


aim4lex 12-31-2006 01:16

Re: Can not have 2 weapons at the same time code inside.
 
up

SweatyBanana 12-31-2006 01:22

Re: Can not have 2 weapons at the same time code inside.
 
Buy the weapon then give yourself the scout.

aim4lex 12-31-2006 01:40

Re: Can not have 2 weapons at the same time code inside.
 
Im playing on CSDM server not originaly cs, so i can not do it.


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

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