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

Little Help Learning


Post New Thread Reply   
 
Thread Tools Display Modes
Ezekiel
Member
Join Date: Mar 2004
Old 03-21-2004 , 06:18  
Reply With Quote #21

with this:

Code:
register_cvar("amx_scoreratio","1")

can i change the '1' for a '%d' and then sub the value from a previously defined var?

Code:
register_cvar("amx_scoreratio","%d", RATIO)

for example
Ezekiel is offline
IceMouse[WrG]
Senior Member
Join Date: Mar 2004
Old 03-21-2004 , 12:16  
Reply With Quote #22

Quote:
Originally Posted by Ezekiel
still by K : D ratio, which is how i rate scores in my head, its less than 1:1, which is poor. no ones ever gonna reach 10k kills either.
One day someone might get bored on a 24/7 dust server... And don't say "Well I would never run a 24/7 dust," because if you're releasing it you have to make sure...
If you want then you can make a cvar for what type to use...
Anyhow back to your question...
Code:
#DEFINE RATIO "1" register_cvar("amx_scoreratio",RATIO)
IceMouse[WrG] is offline
Send a message via AIM to IceMouse[WrG] Send a message via MSN to IceMouse[WrG] Send a message via Yahoo to IceMouse[WrG]
Ezekiel
Member
Join Date: Mar 2004
Old 03-23-2004 , 13:49  
Reply With Quote #23

getting the cvar stuff sorted. but for now i want to check this. it seems that the plugin only works once...

Code:
/* AMX Mod script * * (c) 2004, Ezekiel * This file is provided as is (no warranties). * * A plugin that will generate a value based on player kill minus player deaths * and kick if this value is below a certain value. * * Players with immunity won't be checked */ #include <amxmod> new RATIO = -5 // the number kills-deaths has to equal or be smaller than for the user to be kicked and banned new MINPLAYERS = 12 // number of players to be on server before plugin works new BANTIME = 60 // amount of time to ban people for (minutes) public plugin_init() {     register_plugin("Low Skill Kicker","1.0","Ezekiel")     return PLUGIN_CONTINUE } public client_disconnect(id) {     remove_task(id)     return PLUGIN_CONTINUE } public client_putinserver(id){     new param[1]     param[0] = id     set_task(60.0, "checkScore", id, param, 1) } kickPlayer(id) {     new name[32]     get_user_name(id, name, 31)     new uID = get_user_userid(id)     server_cmd("banid %d #%d", BANTIME, uID)     client_cmd(id, "echo ^"Sorry but you don't have a high enough score^"; disconnect")     client_print(0, print_chat, "%s was disconnected due to being shite!", name)     return PLUGIN_CONTINUE } public checkScore(param[]) {    new id = param[0]    if ((get_user_flags(id) & ADMIN_RESERVATION)) {       remove_task(id)       client_print(id, print_chat, "Score checking disabled due to immunity...you'd best not be shite! ")       return PLUGIN_CONTINUE    }    new PLAYERS = get_playersnum()    if ( PLAYERS >= MINPLAYERS) {       new FRAGS = get_user_frags(id)       new DEATHS = get_user_deaths(id)       new KD = FRAGS - DEATHS       if (KD <= RATIO)       {          kickPlayer(id)          return PLUGIN_CONTINUE       }       else {          return PLUGIN_CONTINUE       }    }    else {       return PLUGIN_CONTINUE    }    return PLUGIN_CONTINUE }

would be cos of this part wouldnt it?

Code:
set_task(Float:time,const function[],id = 0,parameter[]="",len = 0,flags[]="", repeat = 0);

am not too sure how to use that properly, as much of it is less than clear to me.
Ezekiel 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 17:43.


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