Raised This Month: $51 Target: $400
 12% 

[REQ] .ff Command


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kosidone
Member
Join Date: Aug 2014
Old 07-13-2015 , 23:47   [REQ] .ff Command
Reply With Quote #1

solved

Last edited by Kosidone; 11-11-2015 at 14:00.
Kosidone is offline
4ever16
Veteran Member
Join Date: Apr 2015
Old 07-14-2015 , 01:59   Re: [REQ] .ff Command
Reply With Quote #2

Readyscript: https://forums.alliedmods.net/showthread.php?t=125603

You just need to modify the .sma file and compile it again if you need help just reply!

Its the best solution for you.
And no its not only team command everyone can write it.

Quote:
register_clcmd("say .ready","HandleReady") change to register_clcmd("say .ff","HandleReady")
Quote:
register_cvar("sv_minplayers","10") change to register_cvar("sv_minplayers","5")
Quote:
server_cmd( "start" ) change to server_cmd( "restart" )
Change all text chat prints in the .sma file also so it prints the things you want when players write .ff
isnt better to have .gg ?

Last edited by 4ever16; 07-14-2015 at 02:09.
4ever16 is offline
Kosidone
Member
Join Date: Aug 2014
Old 07-14-2015 , 02:06   Re: [REQ] .ff Command
Reply With Quote #3

Really Thnx Man .. i Have auto-mix server too :p

By the Way if anyone can make this plugin Post it i will apreciate it !

Last edited by Kosidone; 07-14-2015 at 02:07.
Kosidone is offline
4ever16
Veteran Member
Join Date: Apr 2015
Old 07-14-2015 , 02:15   Re: [REQ] .ff Command
Reply With Quote #4

5 say .ff = server restart.
If they regret say .ff they can say .noff

When someone write .ff server say 1/5 giving up.
When 1 more writes .ff server say 2/5 giving up.
When 1 of those say .noff server say 1/5 giving up.

Code:
#include <amxmodx>
#include <cstrike>

new bool:gReady[33] = false
new bool:gReStart = false
new gReadyNum

public plugin_init()
{
    // PLUGIN ORIGINAL CODED BY AssKicR
    // most work on this plugin was done by him.
    // Coding errors corrected by KristianI
    register_plugin("Ready?","6.2","KristianI")
    register_clcmd("say .ff","HandleReady")
    register_clcmd("say .noff","HandleStop")
    register_clcmd("say .status","HandleStatus")
    register_cvar("sv_minplayers","5")
}

public HandleReady(id)
{
    
    if(!gReady[id]) {
        gReady[id] = true
        gReadyNum += 1
        HandleStatus
    }else{
        client_print(id,print_chat,"You are giving up already!")
    }
    
}


public HandleStop(id)
{
    
    if(gReady[id]) {
        gReady[id] = false
        gReadyNum -= 1
        client_print(id,print_chat,"You are not giving up!")
        HandleStatus
        //client_print(0,print_chat,"%i/%i giving up!",gReadyNum,get_playersnum())
        }else{
        client_print(id,print_chat,"You are not giving up!")
    }
    
}

public HandleStatus()
{
    
    // Print number of players ready to chat
    client_print(0,print_chat,"%i/%i are giving up!",gReadyNum,get_cvar_num("sv_minplayers"))
    
    // Checks the number of players ready compared to number of
    // players needed to start the game (sv_minplayers)
    if (gReadyNum==get_cvar_num("sv_minplayers") && !gReStart) {
        gReStart = true
        goLIVE
        server_cmd( "restart" )    // execute the command start - this is an alias from
                    // one of my .cfg files
                    // feel free to edit the command or make the alias as I did.
    }
}

public client_disconnect(id)
{
    if (gReady[id]==true) {
        gReady[id]=false
        gReadyNum -= 1
    }
}

public goLIVE() {
    
    for (new playerID=0; playerID<33; playerID++) {
        
        gReady[playerID]=false
        
    }
    
    gReadyNum = 0
    gReStart = false
    
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1030{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/

Last edited by 4ever16; 07-14-2015 at 02:17.
4ever16 is offline
Kosidone
Member
Join Date: Aug 2014
Old 07-14-2015 , 02:20   Re: [REQ] .ff Command
Reply With Quote #5

4ever thnx man it works have Fun !
Kosidone is offline
Kosidone
Member
Join Date: Aug 2014
Old 07-14-2015 , 03:17   Re: [REQ] .ff Command
Reply With Quote #6

oh i found bugs .. the enemy team can type .ff so it's kinda a bug
can anyone edited like for your own team CS_TEAM_CT and CS_TEAM_T
Kosidone is offline
4ever16
Veteran Member
Join Date: Apr 2015
Old 07-14-2015 , 06:02   Re: [REQ] .ff Command
Reply With Quote #7

Its not a bug i wrote that everyone can say it. Its only a solution you and me can use right now.

PS! .ff is actually a comand everyone uses to see if friendly fire is on or off. Better to use .gg

Im also searching for the same plugin as you i know one server which uses exact plugin we both want but its private made.

Last edited by 4ever16; 07-14-2015 at 06:02.
4ever16 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 09:59.


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