Raised This Month: $ Target: $400
 0% 

Used AMXXEasy X :: Need Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
[CFF] gr3ed
Senior Member
Join Date: Oct 2006
Location: UNKNOWN, USA
Old 05-27-2007 , 20:52   Used AMXXEasy X :: Need Help
Reply With Quote #1

I was hoping it'd help me(it didn't) and made a simple plugin. I add "return PLUGIN_HANDLED;" since it does not seem to add that and a few other minor details. But in all....dunno what I'm doing and I'm guessing part of this code is wrong for sure. If someone could help....thanks.
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
// First plugin

#define PLUGIN "amx_random"
#define VERSION "1.0"
#define AUTHOR "gr3ed"


public plugin_init()
{
    register_plugin("PLUGIN","VERSION","AUTHOR")

    register_event("ResetHUD","event_spawn","be")
}

public client_connect(id)
{
    client_print(0,print_chat,"%s Has Joined The Game!")
}


public event_spawn(id)
{
    give_item(id,"42");

     return PLUGIN_HANDLED;
}
Also if you could add comments to explain to me what it all means. Thanks again.
__________________
+karma me if I help.

Last edited by [CFF] gr3ed; 06-08-2007 at 19:42.
[CFF] gr3ed is offline
Send a message via MSN to [CFF] gr3ed Send a message via Yahoo to [CFF] gr3ed
Lee
AlliedModders Donor
Join Date: Feb 2006
Old 05-27-2007 , 21:04   Re: Used AMXXEasy X :: Need Help
Reply With Quote #2

Code:
public client_connect(id) {     new player_name[35]     get_user_name(id, player_name, 34)      client_print(0, print_chat, "%s has joined the server.", player_name) }
As for player spawn; http://forums.alliedmods.net/showthread.php?t=42159.
Lee is offline
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 05-27-2007 , 21:08   Re: Used AMXXEasy X :: Need Help
Reply With Quote #3

PHP Code:
public plugin_init()
{
 
// you dont need  " 
 
register_plugin(PLUGIN,VERSION,AUTHOR)
 
// an event which is triggered when players spawns
 
register_event("ResetHUD","event_spawn","be")
}
public 
client_connect(id)
{
 
// a string to store the players name.
 
new name[32]
 
 
// a function to get the user's name.
 
get_user_name(idname31)
 
 
// prints your message
 
client_print(0,print_chat,"%s Has Joined The Game!"name)
}
 
public 
event_spawn(id)
{
 
//you need a small delay just to make sure it gives your weapon
 
 
set_task(0.1"give_weapon"id)
 
}
public 
give_weapon(id)
{
 
//you need the weapons name in here
 //an example would be give_item(id,"weapon_deagle")
 
give_item(id,"42"// so what ever weapon 42 is

__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.

Last edited by Cheap_Suit; 05-27-2007 at 21:38.
Cheap_Suit is offline
Lee
AlliedModders Donor
Join Date: Feb 2006
Old 05-27-2007 , 21:12   Re: Used AMXXEasy X :: Need Help
Reply With Quote #4

I thought you weren't supposed to rely solely on ResetHUD to detect player spawn as per VEN's tutorial..
Lee is offline
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 05-27-2007 , 21:29   Re: Used AMXXEasy X :: Need Help
Reply With Quote #5

You just need to add few more checks, I didnt add it because I try to make it as simple as possible.
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 05-27-2007 , 21:34   Re: Used AMXXEasy X :: Need Help
Reply With Quote #6

For CS there is not weapon with number 42...
(The answer of all questions is......42*lol*)

Now here is a list of all weapons and its data...maybe its of interest!?

greetz regalis
Attached Files
File Type: txt Weapon index.txt (17.2 KB, 133 views)
__________________
regalis is offline
[CFF] gr3ed
Senior Member
Join Date: Oct 2006
Location: UNKNOWN, USA
Old 05-28-2007 , 00:30   Re: Used AMXXEasy X :: Need Help
Reply With Quote #7

*smacks head* I'm sorry. xD Thanks everyone for this help! Heh...42 is the answer to everything for idiots like me;)

Quote:
Originally Posted by regalis View Post
For CS there is not weapon with number 42...
(The answer of all questions is......42*lol*)

Now here is a list of all weapons and its data...maybe its of interest!?

greetz regalis
__________________
+karma me if I help.
[CFF] gr3ed is offline
Send a message via MSN to [CFF] gr3ed Send a message via Yahoo to [CFF] gr3ed
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 10:37.


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