Raised This Month: $319 Target: $400
 79%   Almost there!

Pro Become V.I.P. [re1.0.4]


Post New Thread Reply   
 
Thread Tools Display Modes
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 04-20-2016 , 21:04   Re: Pro Become V.I.P. [re1.0.2]
Reply With Quote #11

Quote:
Originally Posted by didoWEE View Post
Functionality is not the same!

My way
PHP Code:
    if(!is_user_connected(killer))
        return 
HAM_IGNORED// if true - function stops --> 1 if
    
if(killer == victim)
        return 
HAM_IGNORED// if true - function stops --> 2 ifs
    
if(!is_real_player(killer))
        return 
HAM_IGNORED// if true - function stops --> 3 ifs
    
if(g_bFlagged[killer])
        return 
HAM_IGNORED// if true - function stops --> 4 ifs 
Your way
PHP Code:
if(!is_user_connected(killer) || killer == victim || !is_real_player(killer) || g_bFlagged[killer])
      return 
HAM_IGNORED// if true - function stops -> Always 4 ifs 
Actually it is same, just the 2nd way is more readable.

OR operator returns true on the first thing to return true.
Example:
PHP Code:
new 0;
if (
== || == || == 10// Will not check if x is 5 or 10 if x is 1. If x is 5, it will not check if x is 10.
    // Code here 
WildCard65 is offline
didoWEE
Senior Member
Join Date: Oct 2012
Location: Bulgaria
Old 04-21-2016 , 12:02   Re: Pro Become V.I.P. [re1.0.2]
Reply With Quote #12

I'll stick to my code
Your will still make 4 checks


in is_real_player(id)
we have
PHP Code:
return ((is_user_bot(id) || is_user_hltv(id)) ? false true); 
So we will get errors in console/logs if player is not connected (this is why we stop on the first if and we do NOT check all 4 at once)

PHP Code:
static cell AMX_NATIVE_CALL is_user_bot(AMX *amxcell *params/* 1 param */
{
    
int index params[1];
    
    if (
index || index gpGlobals->maxClients)
        return 
0;
    
    return (
GET_PLAYER_POINTER_I(index)->IsBot() ? 0);
}

static 
cell AMX_NATIVE_CALL is_user_hltv(AMX *amxcell *params/* 1 param */
{
    
int index params[1];
    
    if (
index || index gpGlobals->maxClients)
        return 
0;

    
CPlayer *pPlayer GET_PLAYER_POINTER_I(index);
    
    if (!
pPlayer->initialized)
        return 
0;
    
    if (
pPlayer->pEdict->v.flags FL_PROXY)
        return 
1;
    
    const 
char *authid GETPLAYERAUTHID(pPlayer->pEdict);
    
    if (
authid && stricmp(authid"HLTV") == 0)
        return 
1;
    
    return 
0;

No check if player is connected!



**EDIT**
Updated -> Version: re1.0.3
- Optimisation

Last edited by didoWEE; 04-21-2016 at 12:57. Reason: plugin update
didoWEE is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 04-21-2016 , 19:39   Re: Pro Become V.I.P. [re1.0.2]
Reply With Quote #13

Quote:
Originally Posted by didoWEE View Post
in is_real_player(id)
we have
PHP Code:
return ((is_user_bot(id) || is_user_hltv(id)) ? false true); 
So we will get errors in console/logs if player is not connected (this is why we stop on the first if and we do NOT check all 4 at once)
Both ways will always have the same number of checks.

quoted code can be simplified to:
PHP Code:
return is_user_connect(id) && !(is_user_bot(id) || is_user_hltv(id)); 
EDIT:
AND statements(&& operator) won't check right side if left side is false, example:
PHP Code:
new 0;
if (
false && == 0// This will NEVER check if x is 0 as the left side is always false
    //Code here 
OR statements(|| operator) won't check right side if left side is true, no example needed (as you can replace && in above with ||)

Last edited by WildCard65; 04-22-2016 at 08:25.
WildCard65 is offline
didoWEE
Senior Member
Join Date: Oct 2012
Location: Bulgaria
Old 04-22-2016 , 15:43   Re: Pro Become V.I.P. [re1.0.4]
Reply With Quote #14

Updated!
Version re1.0.4!
- Fixed potential bug/log error
- Optimised chat message

Last edited by didoWEE; 04-22-2016 at 15:45. Reason: rip inglis
didoWEE is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 04-22-2016 , 18:15   Re: Pro Become V.I.P. [re1.0.4]
Reply With Quote #15

Quote:
Originally Posted by didoWEE View Post
Updated!
Version re1.0.4!
- Fixed potential bug/log error
- Optimised chat message
Kkkk
__________________
EFFx is offline
Send a message via Skype™ to EFFx
Molecula
Junior Member
Join Date: Feb 2013
Old 11-26-2019 , 12:13   Re: Pro Become V.I.P. [re1.0.4]
Reply With Quote #16

hi there, could you implement the expiring date as you did in the first version please? was a good feature
Molecula is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 04-10-2020 , 03:07   Re: Pro Become V.I.P. [re1.0.4]
Reply With Quote #17

https://forums.alliedmods.net/showthread.php?t=304480 this one seems more complex.
Unapproved.
__________________
HamletEagle is offline
didoWEE
Senior Member
Join Date: Oct 2012
Location: Bulgaria
Old 01-16-2021 , 07:30   Re: Pro Become V.I.P. [re1.0.4]
Reply With Quote #18

Quote:
Originally Posted by HamletEagle View Post
https://forums.alliedmods.net/showthread.php?t=304480 this one seems more complex.
Unapproved.
nice joke, mate no wonders why the community died took you 4 years to take action, without even reviewing it ahahaha
didoWEE is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 02-03-2021 , 10:07   Re: Pro Become V.I.P. [re1.0.4]
Reply With Quote #19

Quote:
Originally Posted by didoWEE View Post
nice joke, mate no wonders why the community died took you 4 years to take action, without even reviewing it ahahaha
1. I did review it and reached the conclusion the other plugin is objectively better and with more features. No point in doing a code review on a duplicate/bad idea. You are free to update your plugin, add more features, make it better than other plugins and request another review. Being salty about it isn't going to change anything.

2. About it taking 4 years: it takes however long it takes. Moderators/approvers do whatever they can do in whatever free time they have, we are not paid to do anything. We do it voluntarily so it's quite hypocritical of you to expect a free service and then complain it wasn't performed in the way you wanted it to be performed.

3. Just because 4 years passed that means it shouldn't ever be checked?

4. If you look at it objectively, the community "died" because there is less and less interest in cs 1.6 which is perfectly normal for such an old game.
__________________

Last edited by HamletEagle; 02-03-2021 at 10:14.
HamletEagle is offline
didoWEE
Senior Member
Join Date: Oct 2012
Location: Bulgaria
Old 02-08-2021 , 14:00   Re: Pro Become V.I.P. [re1.0.4]
Reply With Quote #20

Quote:
Originally Posted by HamletEagle View Post
1. I did review it and reached the conclusion the other plugin is objectively better and with more features. No point in doing a code review on a duplicate/bad idea. You are free to update your plugin, add more features, make it better than other plugins and request another review. Being salty about it isn't going to change anything.

2. About it taking 4 years: it takes however long it takes. Moderators/approvers do whatever they can do in whatever free time they have, we are not paid to do anything. We do it voluntarily so it's quite hypocritical of you to expect a free service and then complain it wasn't performed in the way you wanted it to be performed.

3. Just because 4 years passed that means it shouldn't ever be checked?

4. If you look at it objectively, the community "died" because there is less and less interest in cs 1.6 which is perfectly normal for such an old game.
the other plugin was released 2 years after mine. if mine was reviewed on time, it would have been approved, or it would have been improved and then approved. in such case, the new plugin would have been a copy of already existing plugin and be unapproved, but now it's the other way around. because of your laziness this thing has been written twice... but whatever

also, he stole my idea without even giving me credits real cool
thats the only thing im mad about

lastly, the game didnt die, the community died... all servers are basically the same... there are no new plugins released, there is nothing new to experience. that's developers' fault.

Last edited by asherkin; 02-09-2021 at 05:39.
didoWEE is offline
Old 02-08-2021, 14:02
didoWEE
This message has been deleted by asherkin.
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 20:50.


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