Raised This Month: $ Target: $400
 0% 

Check my work lol :)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Rolnaaba
Veteran Member
Join Date: May 2006
Old 10-02-2006 , 10:28   Check my work lol :)
Reply With Quote #1

who wants to read my code to make sure I did it right? lol feel free to make fun of my code or to change it and tell me what i did wrong.
Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun> new bool:DamageDone new bool:FirstDeathDone new const FirstDamageSound[] = "sounds/FirstDamage.mp3" new const KnifeDeathSound[] = "sounds/Idiot.mp3" new const AdminDieSound[] = "sounds/Wtf.mp3" new const FreezeTimeEndSound[] = "sounds/Num1.mp3" new const DisconnectSound[] = "sounds/Mario.mp3" new const FirstDeathSound[] = "sounds/Kenny.mp3" new const AdminDieSound3[] = "sounds/Pray.mp3" new const AdminDieSound5[] = "sounds/Bendover.mp3" new const 3KillInRowSound[] = "sounds/KickAss.mp3" public plugin_precache() {  precache_generic(FirstDamageSound)  precache_generic(KnifeDeathSound)  precache_generic(AdminDieSound)  precache_generic(FreezeTimeEndSound)  precache_generic(DisconnectSound)  precache_generic(FirstDeathSound)  precache_generic(AdminDieSound3)  precache_generic(AdminDieSound5)  precache_generic(3KillInRowSound) } public plugin_init() {  register_plugin("test", "test", "test")  register_event("HLTV", "newround", "a", "1=0", "2=0")  register_event("Damage", "FirstDamage", "a")  register_event("DeathMsg", "Death", "a", "1>0")  register_event("DeathMsg", "AdminDie", "b")  register_logevent("logevent_round_start", 2, "1=Round_Start") } public newround(id) { //sets variables that control first_damage, and first_death sounds to false  DamageDone = false  FirstDeathDone = false } public FirstDamage(id) { //is called whenever dmaage is dealt  if (DamageDone == false) {//checks if damage has been done already   client_cmd(0, "mp3 play %s", FirstDamageSound) //plays first damage sound   DamageDone = true //makes sure this only happens on first damage (per round)  } } public Death() { //is called upon death of anyone  new WeaponName[20]  new WeaponID = get_weaponid(WeaponName)      read_data(4, WeaponName, 19)      if(WeaponID == CSW_KNIFE) { //checks if Death was result of knife   client_cmd(0, "mp3 play %s", KnifeDeathSound) //plays knife death sound  }  else if(FirstDeathDone == false) { //if death wasnt result of knife, and is first death continues   client_cmd(0, "mp3 play %s", FirstDeathSound) //plays First death sound   FirstDeathDone = true //makes sure only plays first death sound once per round  } } public AdminDie(id, level, cid) { //is called upon death of anyone  new Victim = read_data(2) //get victim's ID  if(access(Victim, ADMIN_LEVEL_B)) { //checks access level of the victim   client_cmd(0, "mp3 play %s", AdminDieSound) //plays Admin death sound  } } public logevent_round_start() { //is called at end of freeze time  client_cmd(0, "mp3 play %s", FreezeTimeEndSound) //plays freeze time end sound } public client_disconnect(id) { //is called when someone disconnects  client_cmd(0, "mp3 play %s", DisconnectSound) //plays disconnect sound }

just ignore the 3kill in row, and admin die 3 and admindie5 sounds havent made those yet.
__________________
DO NOT PM me about avp mod.

Last edited by Rolnaaba; 10-03-2006 at 09:55.
Rolnaaba is offline
allenwr
Veteran Member
Join Date: Jan 2006
Location: The place where the karm
Old 10-02-2006 , 10:40   Re: Check my work lol :)
Reply With Quote #2

IM a little noobish this morning, but i say...

I like it, and it looks good. +karma
__________________
Don't ever place an order with Vee Servers. This is why.
allenwr is offline
Send a message via ICQ to allenwr Send a message via Yahoo to allenwr
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 10-02-2006 , 11:41   Re: Check my work lol :)
Reply With Quote #3

ahem :Cough:
Code:
public precache() {
to
Code:
public plugin_precache() {
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Rolnaaba
Veteran Member
Join Date: May 2006
Old 10-02-2006 , 15:13   Re: Check my work lol :)
Reply With Quote #4

omfg I can't believe I actually did that. thanks but what I am realy looking for is someone to maybe, test? and check if it works well
__________________
DO NOT PM me about avp mod.

Last edited by Rolnaaba; 10-03-2006 at 10:28.
Rolnaaba is offline
MaximusBrood
Veteran Member
Join Date: Sep 2005
Location: The Netherlands
Old 10-02-2006 , 17:25   Re: Check my work lol :)
Reply With Quote #5

Your avatar isn't even remotely funny...
__________________
Released six formerly private plugins. Not active here since ages.
MaximusBrood is offline
Charming
BANNED
Join Date: Nov 2005
Location: Canada
Old 10-02-2006 , 18:35   Re: Check my work lol :)
Reply With Quote #6

Quote:
Originally Posted by MaximusBrood View Post
Your avatar isn't even remotely funny...
lol brood take it easy on the kid ^-^
Charming is offline
Send a message via ICQ to Charming Send a message via AIM to Charming Send a message via MSN to Charming Send a message via Yahoo to Charming
TheNewt
Donor
Join Date: Jun 2006
Location: Where I live.
Old 10-02-2006 , 19:00   Re: Check my work lol :)
Reply With Quote #7

Brood your avatar isn't all that funny either ^.^
__________________
Quote:
toe3_ left the chat room. (G-lined (AUTO Excessive connections from a single host.))
TheNewt is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 10-03-2006 , 01:05   Re: Check my work lol :)
Reply With Quote #8

Oh and it is also "mp3 play <mp3>" not "play mp3 <mp3>"
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Rolnaaba
Veteran Member
Join Date: May 2006
Old 10-03-2006 , 09:42   Re: Check my work lol :)
Reply With Quote #9

thanks Xanimos for staying on topic correcting...
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 10-03-2006 , 09:49   Re: Check my work lol :)
Reply With Quote #10

Why do you want someone else to test it? i.e. Why can't/won't you test it yourself?
__________________
Brad 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 04:55.


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