Raised This Month: $ Target: $400
 0% 

[HELP] Editing Auto-mix by p1Mp


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Flaming
Member
Join Date: Aug 2012
Location: India
Old 02-14-2015 , 05:41   [HELP] Editing Auto-mix by p1Mp
Reply With Quote #1

Greetings once again coders,
We all have seen p1Mp's Auto-Mix Plugin which does marvels. Today I tried editing the plugin to add a new feature: Dynamic Game Name Changer.

Description: The Game Name would change from "Counter-Strike" to "Match Not Started!"(when the match hasn't started) and to "[CT] %i : %i [T]"(showing the number of rounds won by each team, when the match is being played)!

Being new (or you can say NOT an expert) in scripting I have tried the following:

PHP Code:
public plugin_init() {
     
//.......
     
register_logevent("Game_Desc_New_Round"2"1=Round_End")
     
//.......
}

public 
Game_Desc_New_Round() {
    
register_forward(FM_GetGameDescription"DescGame");
}

public 
DescGame() { // what I hoped(and want): This would change Game Name each round! But reality: doesn't work!
    
new scoreOne
    
new scoreTwo
    scoreOne 
g_iScore[0]
    
scoreTwo g_iScore[1]
    
forward_return(FMV_STRING"[CT] %i : %i [T]"scoreOnescoreTwo);
    return 
FMRES_SUPERCEDE;
}

/*public Change() {     
    forward_return(FMV_STRING, "Auto-Mix By p1Mp");
    return FMRES_SUPERCEDE;
}*/ 
And you guessed it right. This is not working!
Someone's help will be highly appreciated.
__________________
There are 10 types of people in this world. Those who understand binary and those who don't!

Gotcha!

Last edited by Flaming; 02-14-2015 at 05:44.
Flaming is offline
JusTGo
Veteran Member
Join Date: Mar 2013
Old 02-14-2015 , 06:09   Re: [HELP] Editing Auto-mix by p1Mp
Reply With Quote #2

take a look at this it may help you:
https://forums.alliedmods.net/showthread.php?p=811157
__________________
JusTGo is offline
Flaming
Member
Join Date: Aug 2012
Location: India
Old 02-14-2015 , 06:28   Re: [HELP] Editing Auto-mix by p1Mp
Reply With Quote #3

Quote:
Originally Posted by JusTGo View Post
take a look at this it may help you:
https://forums.alliedmods.net/showthread.php?p=811157
Wow, That was a very quick reply! But sorry to say, that plugin's working went right through my head!
__________________
There are 10 types of people in this world. Those who understand binary and those who don't!

Gotcha!
Flaming is offline
Flaming
Member
Join Date: Aug 2012
Location: India
Old 02-14-2015 , 07:45   Re: [HELP] Editing Auto-mix by p1Mp
Reply With Quote #4

Quote:
Originally Posted by JusTGo View Post
take a look at this it may help you:
https://forums.alliedmods.net/showthread.php?p=811157
After pondering upon the plugin you gave me, I managed to solve the problem! Thank you so very much!!!
__________________
There are 10 types of people in this world. Those who understand binary and those who don't!

Gotcha!
Flaming 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 12:25.


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