Raised This Month: $ Target: $400
 0% 

Point System 1.6.2 || [14/10/2008]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-18-2008 , 11:46   Re: Point System 1.4.4 || [6/18/2008]
Reply With Quote #1

Next round.


point_system.sma

line 389 :
You can add 'clamp()' or 'max()' ( if you want to check the min value only ) function to avoid people to store a negative/null/too high value.
Code:
set_task(get_pcvar_float(ps_adv_time), "fwd_adv_help", _, _, _, "b");
2 exemples ->
Code:
set_task(clamp(get_pcvar_float(ps_adv_time), MyMinValue, MyMaxValue), "fwd_adv_help", _, _, _, "b");
Code:
set_task(max(MyMinValue, get_pcvar_float(ps_adv_time)), "fwd_adv_help", _, _, _, "b");

line 404 :
This line alone does nothing :
Code:
clamp(get_pcvar_num(ps_adv_time), 50, 250);
As I've said, you should write :
Code:
set_pcvar_num(ps_adv_time, clamp(get_pcvar_num(ps_adv_time), 50, 250) );

line 497 : client_disconnect() / gb_user_alive
You should add into this function, that, otherwise you will got unexpected results :
Code:
gb_user_alive[id] = false;

lines 955, 983 : round_won_t() / round_won_ct()
Again, don't create var into a for(). Just create one time before the for().
Code:
        for(new i = 0; i <= num; ++i)         {             new plr = players[i];

line ~1000 : chameleon()
Use a switch here to avoid to call 2 times [i]fm_get_user_team()|/i] if team is CT. Also, no need to create the 'num' var, too..
Code:
    switch( fm_get_user_team(id) )     {         case CS_TEAM_T  :         {             switch(random_num(1, 4))             {                 case 1: fm_set_user_model(id, "sas");                 case 2: fm_set_user_model(id, "gign");                 case 3: fm_set_user_model(id, "gsg9");                 case 4: fm_set_user_model(id, "urban");             }         }         case CS_TEAM_CT :         {             switch(random_num(1, 4))             {                 case 1: fm_set_user_model(id, "leet");                 case 2: fm_set_user_model(id, "terror");                 case 3: fm_set_user_model(id, "arctic");                 case 4: fm_set_user_model(id, "guerilla");             }         }     }

I would prefer to do somethink like ( but really it's user preference here ). It takes less place.
Also, for me, that's more neat since it's constant values.

Code:
    new const g_HumanModels_T [][] = { "sas", "gign", "gsg9", "urban" };     new const g_HumanModels_CT[][] = { "leet", "terror", "arctic", "guerilla" };     // [...]     switch( fm_get_user_team(id) )     {         case CS_TEAM_T  : fm_set_user_model(id, g_HumanModels_T [random_num(0, 3)] );         case CS_TEAM_CT : fm_set_user_model(id, g_HumanModels_CT[random_num(0, 3)] );     }

ps/cpm.inl
plugin_precache() :
- 'static' is useless here.
- Don't create var in the for()

comds.inl
Something like : if ( equali(mystring[0], "") ) is exactly the same than if( !mystring[0] ) but better since it doesn't use native. You should change.

stocks.inl

About is_ps_on() :
is_plugin_loaded() and cvar_exists() is totaly useless. Also this function is called so often, and each time you check that. I can't believe lol.
Something like would be enough :

Code:
stock bool:is_ps_on() {     if(!get_pcvar_num(ps_toggle) || get_playersnum() < get_pcvar_num(ps_players))         return false;     return true; }
About : message_begin(MSG_TYPE, get_user_msgid("SayText"), _, id);
Either create a global var abobe plugin_init() either you can do :

Code:
static iSayText; if( !iSayText ) iSayText = get_user_msgid("SayText"); message_begin(MSG_TYPE, iSayText, _, id)

As additional notes, I don't like cvars. I prefer using a global command which is better to manage easily the customization without using a lot 'get_pcvar_*' native.
If I have to use it, I will try at least to cache some cvars which are called very often.


That's all for the moment. There are so many optimizations/changements to do again, but it needs to understand more deeply the plugin and i'm lazy to do that atm.
__________________
Arkshine is offline
dekken
Veteran Member
Join Date: Jul 2007
Old 07-14-2008 , 13:13   Re: Point System 1.3 || [6/14/2008]
Reply With Quote #2

Here i come with bugs

First

[PS] You muted GSiTK for 2 minutes, -1 mutes left
even tho i had 5.

second one
the Menu got fucked...same time when the above happend.
Code:
http://i33.tinypic.com/2yv6had.jpg

Also when all the above Happens.
the menu is not useable!
__________________
Signature Goes Here
dekken is offline
kevinikill
Member
Join Date: Mar 2008
Location: Home
Old 07-14-2008 , 13:16   Re: Point System 1.3 || [6/14/2008]
Reply With Quote #3

Finally it's done realllly nice +karma really great plugin waited long time and now waiting for fixes XD
__________________

kevinikill is offline
atomen
Veteran Member
Join Date: Oct 2006
Location: Stockholm, Sweden
Old 07-14-2008 , 13:17   Re: Point System 1.3 || [6/14/2008]
Reply With Quote #4

Quote:
Originally Posted by kevinikill View Post
Finally it's done realllly nice +karma really great plugin waited long time and now waiting for fixes XD
Thanks, I'll try to fix everything asap.
__________________
atomen is offline
Send a message via MSN to atomen
kevinikill
Member
Join Date: Mar 2008
Location: Home
Old 07-14-2008 , 13:25   Re: Point System 1.3 || [6/14/2008]
Reply With Quote #5

Mh I dont think it's a bug but maybe a problem for some people...
U made the plugin that a player who buys the model has one model for ct and t as i saw if im wrong correct me.
Maybe you could make it like a player buys the model and he has in ct an other model than in t.


(sorry for my bad english, maybe you can understand what i wrote... )
__________________


Last edited by kevinikill; 07-14-2008 at 13:32.
kevinikill is offline
atomen
Veteran Member
Join Date: Oct 2006
Location: Stockholm, Sweden
Old 07-14-2008 , 13:36   Re: Point System 1.3 || [6/14/2008]
Reply With Quote #6

Quote:
Originally Posted by kevinikill View Post
Mh I dont think it's a bug but maybe a problem for some people...
U made the plugin that a player who buys the model has one model for ct and t as i saw if im wrong correct me.
Maybe you could make it like a player buys the model and he has in ct an other model than in t.


(sorry for my bad english, maybe you can understand what i wrote... )
You said how it was like now, and you wanted to change how it is now...
__________________
atomen is offline
Send a message via MSN to atomen
atomen
Veteran Member
Join Date: Oct 2006
Location: Stockholm, Sweden
Old 07-14-2008 , 13:37   Re: Point System 1.3 || [6/14/2008]
Reply With Quote #7

Quote:
Originally Posted by dekken View Post
Here i come with bugs

First

[PS] You muted GSiTK for 2 minutes, -1 mutes left
even tho i had 5.

second one
the Menu got fucked...same time when the above happend.
Code:
http://i33.tinypic.com/2yv6had.jpg
Also when all the above Happens.
the menu is not useable!
Whats your amxx version and do you have any logs ?
Since this doesn't occur for me. Can anyone test and confirm this ?
__________________
atomen is offline
Send a message via MSN to atomen
sekos
Member
Join Date: May 2007
Location: Poland
Old 07-14-2008 , 14:05   Re: Point System 1.3 || [6/14/2008]
Reply With Quote #8

Quote:
Originally Posted by dekken View Post
Here i come with bugs

First

[PS] You muted GSiTK for 2 minutes, -1 mutes left
even tho i had 5.

second one
the Menu got fucked...same time when the above happend.
Code:
http://i33.tinypic.com/2yv6had.jpg
Also when all the above Happens.
the menu is not useable!
I have this problem too
__________________
rzulf




sekos is offline
Send a message via MSN to sekos Send a message via Skype™ to sekos
Jawz
Member
Join Date: Jul 2007
Old 07-14-2008 , 14:25   Re: Point System 1.3 || [6/14/2008]
Reply With Quote #9

when some1 have bought model u then u cant enter the menu again
And only one player can have that model :/
__________________
Jawz is offline
dekken
Veteran Member
Join Date: Jul 2007
Old 07-14-2008 , 13:50   Re: Point System 1.3 || [6/14/2008]
Reply With Quote #10

Lastet version...
1.8.1.3 or some
and no, no logs.
only this...

The menu not Responding happens allot..
if you buy Allot of stuff or use it allot it happens
__________________
Signature Goes Here
dekken 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 03:31.


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