AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   giveweapons on round start (https://forums.alliedmods.net/showthread.php?t=55085)

mrpanda 05-12-2007 22:30

giveweapons on round start
 
how do i give user weapon on round start like i want to give everyone

a deagle and usp on round start along with a he-gernade

djmd378 05-12-2007 22:40

Re: giveweapons on round start
 
Code:
/* Gives item to player, name of item can start  * with weapon_, ammo_ and item_. This event  * is announced with proper message to all players. */ give_item(index, const item[]);

Alka 05-13-2007 04:03

Re: giveweapons on round start
 
something like this
Code:

#include <amxmodx>
#include <fun>
 
#define PLUGIN ""
#define VERSION ""
#define AUTHOR ""
 
public plugin_init() {
 
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_logevent("round_start", 2, "1=Round_Start")
}
 
public round_start() {
 
  new players[32], num
  get_players(players, num)
 
  new player
  for(new i = 0; i < num; i++)
  {
        player = players[i]
 
        give_item(player,"weapon_deagle")
        give_item(player,"ammo_50ae")
        give_item(player,"ammo_50ae")
        give_item(player,"ammo_50ae")
        give_item(player,"weapon_hegrenade")
  }
}

This code gives to all players on round start(when freezetime is 0) a deagle + henade :wink:

VEN 05-13-2007 05:30

Re: giveweapons on round start
 
This event is happen before player spawn so this code will give items only to a players that is respawning.

Alka 05-13-2007 05:45

Re: giveweapons on round start
 
Oh...I changed the code to give the wepons on round_start! :D Ty VEN


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

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