Raised This Month: $ Target: $400
 0% 

How to force a weapon.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
The Specialist
BANNED
Join Date: Nov 2006
Old 11-09-2006 , 18:48   Re: How to force a weapon.
Reply With Quote #3

here this will givve all players a m4a1 on player spawn
Code:
#include <amxmodx> #include <amxmisc> #include <fun> #define MAX_PLAYERS 32 new bool:g_restart_attempt[MAX_PLAYERS + 1] public plugin_init() {  register_plugin("give_weapon","1.0","The Specialist");  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 PLUGIN_HANDLED } 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) } // this function is called on player spawn public event_player_spawn(id) {  give_item(id, "weapon_m4a1"); }
The Specialist is offline
Send a message via AIM to The Specialist
 



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 07:01.


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