Raised This Month: $32 Target: $400
 8% 

Solved np


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Magicher0ex
Member
Join Date: Dec 2019
Old 11-28-2020 , 17:46   np
Reply With Quote #1

np

Last edited by Magicher0ex; 11-30-2020 at 07:48.
Magicher0ex is offline
AnimalMonster
Senior Member
Join Date: May 2020
Old 11-28-2020 , 19:44   Re: Can anyone help please
Reply With Quote #2

PHP Code:
/* When a player scores, he takes +3 frag. It can be change with cvar. */

#include <amxmodx>
#include <simple_ctf>
#include <hamsandwich>
#include <fun>

new skorinfo;
new 
pCvar_scored_frag;

public 
plugin_init()
{
    
register_plugin("SCTF Scored Frag""1.2""Yek'-ta")
    
skorinfo get_user_msgid("ScoreInfo")
    
pCvar_scored_frag get_pcvar_num(register_cvar("sctf_scored_frag""3"))
}
public 
sctf_flag_scored(playerent){

    new 
newFrags get_user_frags(player) + pCvar_scored_frag
    set_user_frags
(player,newFrags)
    
message_begin(MSG_ALLskorinfo)
    
write_byte(player)
    
write_short(newFrags)
    
write_short(get_user_deaths(player))
    
write_short(0)
    
write_short(get_user_team(player))
    
message_end()
    
set_task(0.5"TaskKill"player)
}

public 
TaskKill(player)
{
     for(new 
0get_maxplayers(); i++)
     {
            if(
get_user_team(i) != get_user_team(player))
            {
                 
ExecuteHamB(Ham_Killedi)
            }
     }

AnimalMonster is offline
Magicher0ex
Member
Join Date: Dec 2019
Old 11-28-2020 , 20:27   Re: Can anyone help please
Reply With Quote #3

here is the link of plugin: https://forums.alliedmods.net/showthread.php?t=317431

Last edited by Magicher0ex; 11-28-2020 at 20:30.
Magicher0ex is offline
Magicher0ex
Member
Join Date: Dec 2019
Old 11-28-2020 , 20:42   Re: Can anyone help please
Reply With Quote #4

Quote:
Originally Posted by AnimalMonster View Post
PHP Code:
/* When a player scores, he takes +3 frag. It can be change with cvar. */

#include <amxmodx>
#include <simple_ctf>
#include <hamsandwich>
#include <fun>

new skorinfo;
new 
pCvar_scored_frag;

public 
plugin_init()
{
    
register_plugin("SCTF Scored Frag""1.2""Yek'-ta")
    
skorinfo get_user_msgid("ScoreInfo")
    
pCvar_scored_frag get_pcvar_num(register_cvar("sctf_scored_frag""3"))
}
public 
sctf_flag_scored(playerent){

    new 
newFrags get_user_frags(player) + pCvar_scored_frag
    set_user_frags
(player,newFrags)
    
message_begin(MSG_ALLskorinfo)
    
write_byte(player)
    
write_short(newFrags)
    
write_short(get_user_deaths(player))
    
write_short(0)
    
write_short(get_user_team(player))
    
message_end()
    
set_task(0.5"TaskKill"player)
}

public 
TaskKill(player)
{
     for(new 
0get_maxplayers(); i++)
     {
            if(
get_user_team(i) != get_user_team(player))
            {
                 
ExecuteHamB(Ham_Killedi)
            }
     }


It doesn't work.
Magicher0ex is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-28-2020 , 21:04   Re: Can anyone help please
Reply With Quote #5

Can you clarify what you want? Is it when a player gets a kill, all enemies get slayed? Please provide more specifics
__________________
Bugsy is offline
Magicher0ex
Member
Join Date: Dec 2019
Old 11-28-2020 , 21:12   Re: Can anyone help please
Reply With Quote #6

Quote:
Originally Posted by Bugsy View Post
Can you clarify what you want? Is it when a player gets a kill, all enemies get slayed? Please provide more specifics
No, when i get the enemy flag and come back to our flag base i get 3 frags and the team win 1 score round
Actually i want everyone from the enemy team to die when i deliver the flag. Like new round.
I am not killing someone, just leave the flag on my base.

Last edited by Magicher0ex; 11-28-2020 at 21:14.
Magicher0ex is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-28-2020 , 21:15   Re: Can anyone help please
Reply With Quote #7

So what does the plugin above not do that you need it to do? Does it just need added functionality?
__________________
Bugsy is offline
Magicher0ex
Member
Join Date: Dec 2019
Old 11-28-2020 , 21:20   Re: Can anyone help please
Reply With Quote #8

Quote:
Originally Posted by Bugsy View Post
So what does the plugin above not do that you need it to do? Does it just need added functionality?
Yes, like touchdown killing enemies
Magicher0ex is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-28-2020 , 21:24   Re: Can anyone help please
Reply With Quote #9

I don't know how your mod works, I need to know what in the game should be the trigger for slaying the enemies.
__________________
Bugsy is offline
Magicher0ex
Member
Join Date: Dec 2019
Old 11-29-2020 , 11:18   Re: Can anyone help please
Reply With Quote #10

Quote:
Originally Posted by Bugsy View Post
I don't know how your mod works, I need to know what in the game should be the trigger for slaying the enemies.
here is: https://www.youtube.com/watch?v=UAst...ature=youtu.be

And down is the main plugin:
Attached Files
File Type: sma Get Plugin or Get Source (simple_ctf.sma - 61 views - 25.3 KB)
Magicher0ex is offline
Reply


Thread Tools
Display Modes

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 00:30.


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