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

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


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   General Purpose       
didoWEE
Senior Member
Join Date: Oct 2012
Location: Bulgaria
Old 04-10-2016 , 05:53   Pro Become V.I.P. [re1.0.4]
Reply With Quote #1

Pro Become V.I.P.
by didoWEE


*Supported again after 2 years*
Version: re1.0.4 (nvault only)


[Description]
When someone reaches certain number of kills he becomes V.I.P.
Kills are saved in nVault file by Name, IP address or SteamID (default: SteamID)
The goal of this plugin is to make the players more regular by rewarding them with V.I.P. privileges.

[Settings]
* Defines
PHP Code:
#define SAVE_TYPE  3         // Save type (1 - Name / 2 - IP address / 3 - SteamID)
#define MSG_TAG   "FREE VIP"      // Chat Tag (prefix) 
* Cvars
PHP Code:
amx_vip_kills 1500      // Required kills for every player to become V.I.P.
amx_vip_flags "abc"      // Admin flags granted when someone becomes V.I.P. 
*IMPORTANT*
This plugin must be put JUST BEFORE the admin slot reservation plugin
In plugins.ini
PHP Code:
pb_vip.amxx
adminslots
.amxx      slot reservation 
Attached Files
File Type: sma Get Plugin or Get Source (pb_vip.sma - 1537 views - 4.1 KB)

Last edited by didoWEE; 04-22-2016 at 15:40. Reason: Update re1.0.4
didoWEE is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 04-10-2016 , 06:48   Re: Pro Become V.I.P. [re1.0.1]
Reply With Quote #2

PHP Code:
    if(!is_user_connected(id))
        return 
HAM_IGNORED;
    if(!
is_user_alive(id))
        return 
HAM_IGNORED
For your information, only is_user_alive is needed, as it does all the other checks.
Also, name max len is 32, not 33. Also in UpdateData read_flags should be cached.
In vformat charsmax should be used for getting string array size.

I am not sure what to do with this. Considering plugin purpose and ignoring the code, does something like this worth to be approved? I have to think.
__________________
HamletEagle is offline
didoWEE
Senior Member
Join Date: Oct 2012
Location: Bulgaria
Old 04-10-2016 , 06:57   Re: Pro Become V.I.P. [re1.0.1]
Reply With Quote #3

Quote:
Originally Posted by HamletEagle View Post
PHP Code:
    if(!is_user_connected(id))
        return 
HAM_IGNORED;
    if(!
is_user_alive(id))
        return 
HAM_IGNORED
For your information, only is_user_alive is needed, as it does all the other checks.
Also, name max len is 32, not 33. Also in UpdateData read_flags should be cached.
In vformat charsmax should be used for getting string array size.

I am not sure what to do with this. Considering plugin purpose and ignoring the code, does something like this worth to be approved? I have to think.
All considered - updated!
didoWEE is offline
crnova
Senior Member
Join Date: Sep 2015
Old 04-10-2016 , 11:05   Re: Pro Become V.I.P. [re1.0.2]
Reply With Quote #4

PHP Code:
if(!is_user_connected(killer))
        return 
HAM_IGNORED;
if(
killer == victim)
        return 
HAM_IGNORED;
if(!
is_real_player(killer))
        return 
HAM_IGNORED;
if(
g_bFlagged[killer])
        return 
HAM_IGNORED
->

PHP Code:
if(!is_user_connected(killer) || killer == victim || !is_real_player(killer) || g_bFlagged[killer])
     return 
HAM_IGNORED 
PHP Code:
if(!is_user_alive(id))
        return 
HAM_IGNORED;
if(!
is_real_player(id))
        return 
HAM_IGNORED;
if(
g_bFlagged[id])
        return 
HAM_IGNORED
->
PHP Code:
if(!is_user_alive(id) || !is_real_player(id) || g_bFlagged[id])
               return 
HAM_IGNORED 
__________________

Last edited by crnova; 04-10-2016 at 11:06.
crnova is offline
didoWEE
Senior Member
Join Date: Oct 2012
Location: Bulgaria
Old 04-10-2016 , 11:33   Re: Pro Become V.I.P. [re1.0.2]
Reply With Quote #5

Quote:
Originally Posted by crnova View Post
PHP Code:
if(!is_user_connected(killer))
        return 
HAM_IGNORED;
if(
killer == victim)
        return 
HAM_IGNORED;
if(!
is_real_player(killer))
        return 
HAM_IGNORED;
if(
g_bFlagged[killer])
        return 
HAM_IGNORED
->

PHP Code:
if(!is_user_connected(killer) || killer == victim || !is_real_player(killer) || g_bFlagged[killer])
     return 
HAM_IGNORED 
PHP Code:
if(!is_user_alive(id))
        return 
HAM_IGNORED;
if(!
is_real_player(id))
        return 
HAM_IGNORED;
if(
g_bFlagged[id])
        return 
HAM_IGNORED
->
PHP Code:
if(!is_user_alive(id) || !is_real_player(id) || g_bFlagged[id])
               return 
HAM_IGNORED 
nope
didoWEE is offline
crnova
Senior Member
Join Date: Sep 2015
Old 04-19-2016 , 16:20   Re: Pro Become V.I.P. [re1.0.2]
Reply With Quote #6

Why not? less lines, but same functionality
__________________
crnova is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 04-19-2016 , 16:34   Re: Pro Become V.I.P. [re1.0.2]
Reply With Quote #7

PHP Code:
public client_infochanged(id)
 
set_task(0.1"UpdateData"id); 
->

PHP Code:
public client_infochanged(id)
 
UpdateData(id); 
PHP Code:
 if(g_iKills[id] == 0)
  
SayText(id"^4[%s] ^1Players who play ^3regularly ^1are rewarded with ^4V.I.P. ^1privileges"MSG_TAG); 
->

PHP Code:
 if(g_iKills[id] <= 10// Wil be better
  
SayText(id"^4[%s] ^1Players who play ^3regularly ^1are rewarded with ^4V.I.P. ^1privileges",MSG_TAG); 
And how crnova wrote:

Quote:
Originally Posted by crnova View Post
PHP Code:
if(!is_user_connected(killer))
         return 
HAM_IGNORED;
 if(
killer == victim)
         return 
HAM_IGNORED;
 if(!
is_real_player(killer))
         return 
HAM_IGNORED;
 if(
g_bFlagged[killer])
         return 
HAM_IGNORED
->

PHP Code:
if(!is_user_connected(killer) || killer == victim || !is_real_player(killer) || g_bFlagged[killer])
      return 
HAM_IGNORED 
PHP Code:
if(!is_user_alive(id))
         return 
HAM_IGNORED;
 if(!
is_real_player(id))
         return 
HAM_IGNORED;
 if(
g_bFlagged[id])
         return 
HAM_IGNORED
->
PHP Code:
if(!is_user_alive(id) || !is_real_player(id) || g_bFlagged[id])
                return 
HAM_IGNORED 
Suggestion:

Add translate. Its a simple and good plugin.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 04-19-2016 at 16:39.
EFFx is offline
didoWEE
Senior Member
Join Date: Oct 2012
Location: Bulgaria
Old 04-20-2016 , 08:53   Re: Pro Become V.I.P. [re1.0.2]
Reply With Quote #8

Quote:
Originally Posted by crnova View Post
Why not? less lines, but same functionality
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 
I am not sure about client_infochanged()
I have to check


Stop spamming my thread, please!
didoWEE is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 04-20-2016 , 14:53   Re: Pro Become V.I.P. [re1.0.2]
Reply With Quote #9

Spam? Its suggestion, if do you want your plugin be approved, ok. We will stop given suggestion for your simple plugin that i can make in 10 minutes. And a better format
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 04-20-2016 , 15:26   Re: Pro Become V.I.P. [re1.0.2]
Reply With Quote #10

Quote:
Originally Posted by EFFx View Post
Spam? Its suggestion, if do you want your plugin be approved, ok. We will stop given suggestion for your simple plugin that i can make in 10 minutes. And a better format
Stop talking about approved or unapproved plugins.
__________________

Last edited by HamletEagle; 04-20-2016 at 15:28.
HamletEagle 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 10:31.


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