Raised This Month: $ Target: $400
 0% 

Help-Me


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Lawiet
Junior Member
Join Date: Aug 2013
Old 08-29-2013 , 14:42   Help-Me
Reply With Quote #1

Quote:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

#define PLUGIN "WeaponGive"
#define VERSION "1.0"
#define AUTHOR "Dr.House"

new CurrentRound
new maxplayers
new g_menu_active
new bool:cmdAcces[33], g_iMaxPlayers

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
register_logevent("LogEvent_RoundStart", 1, "1=Round_Start" );
maxplayers = get_maxplayers()
g_menu_active = register_cvar("menu_active", "1");
}

public LogEvent_RoundStart()
{
CurrentRound++;
new players[32], player, pnum;
get_players(players, pnum, "a");
for(new i = 0; i < pnum; i++)
{
player = players[i];
if(is_user_alive(player) && get_user_flags(player) & ADMIN_LEVEL_H)
{
give_item(id, "weapon_hegrenade");
give_item(id, "item_assaultsuit");
give_item(id, "item_thighpack");

if (!get_pcvar_num(g_menu_active))
return PLUGIN_CONTINUE

if(CurrentRound >= 1)

return PLUGIN_HANDLED
}
}
}
Error In Give Item, He Da Error In Compile Time Help Me Please
Lawiet is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 08-29-2013 , 14:47   Re: Help-Me
Reply With Quote #2

Replace id with player
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Lawiet
Junior Member
Join Date: Aug 2013
Old 08-29-2013 , 14:49   Re: Help-Me
Reply With Quote #3

Please, Could Tell Me Fit. Sma Cause I'm Very Apprentice!
Lawiet is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 08-29-2013 , 14:52   Re: Help-Me
Reply With Quote #4

He told you what to do.

Quote:
Originally Posted by YamiKaitou View Post
Replace id with player
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.

Last edited by wickedd; 08-29-2013 at 14:52.
wickedd is offline
Lawiet
Junior Member
Join Date: Aug 2013
Old 08-29-2013 , 15:17   Re: Help-Me
Reply With Quote #5

I managed to compile worked, So Do not Give Owed the Weapons!
Lawiet is offline
Lawiet
Junior Member
Join Date: Aug 2013
Old 08-29-2013 , 15:32   Help-Me
Reply With Quote #6

My Plugin Is Not Giving Weapon, More When I Player I put in place of id Compiles When I id I put in place the Player Not Compile Error

Quote:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

#define PLUGIN "WeaponGive"
#define VERSION "1.0"
#define AUTHOR "Dr.House"

new CurrentRound
new maxplayers
new g_menu_active
new bool:cmdAcces[33], g_iMaxPlayers

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
register_logevent("LogEvent_RoundStart", 1, "1=Round_Start" );
maxplayers = get_maxplayers()
g_menu_active = register_cvar("menu_active", "1");
}

public LogEvent_RoundStart()
{
CurrentRound++;
new players[32], player, pnum;
get_players(players, pnum, "a");
for(new i = 0; i < pnum; i++)
{
player = players[i];
if(is_user_alive(player) && get_user_flags(player) & ADMIN_LEVEL_H)
{
give_item(player, "weapon_m3")
give_item(player,"ammo_556nato")
give_item(player,"ammo_556nato")
give_item(player,"ammo_556nato")
give_item(player,"ammo_556nato")
give_item(player,"ammo_556nato")
give_item(player,"ammo_556nato")
give_item(player,"ammo_556nato")
give_item(player,"ammo_556nato")
give_item(player,"weapon_deagle")
give_item(player,"ammo_50ae")
give_item(player,"ammo_50ae")
give_item(player,"ammo_50ae")
give_item(player,"ammo_50ae")
give_item(player,"ammo_50ae")
give_item(player,"ammo_50ae")
give_item(player,"ammo_50ae")
give_item(player,"weapon_knife")
give_item(player,"weapon_hegrenade")
give_item(player, "item_assaultsuit");
give_item(player, "item_thighpack");
cs_set_user_bpammo( player, CSW_M3, 99 )
cs_set_user_bpammo( player, CSW_DEAGLE, 99 )

if (!get_pcvar_num(g_menu_active))
return PLUGIN_CONTINUE

if(CurrentRound >= 1)

return PLUGIN_HANDLED
}
}
}
Lawiet is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 08-29-2013 , 16:23   Re: Help-Me
Reply With Quote #7

First, fix the title.

is_user_alive(player) is not needed because of the "a" flag in get_players().
I would suggest adding "h" as a flag aswell.

Code:
            if (!get_pcvar_num(g_menu_active))                 return PLUGIN_CONTINUE             if(CurrentRound >= 1) // This will always return true.                 return PLUGIN_HANDLED
Both of these will break the loop and exit the function after one player receive these items. Is this what you want?

Why don't you explain what you want instead? It's hard to guess with these things.
__________________

Last edited by Black Rose; 08-29-2013 at 16:32.
Black Rose is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 08-29-2013 , 16:31   Re: Help-Me
Reply With Quote #8

You can remove "give_item( player, "ammo_556nato" ) because "cs_set_user_bpammo( player, CSW_M3, 99 )
does the same thing.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
Reply



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 19:14.


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