Raised This Month: $410 Target: $400
 102% 

Automatic VIP


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
yRestrict
Member
Join Date: Apr 2019
Old 02-03-2020 , 14:01   Automatic VIP
Reply With Quote #1

Could someone help me
I have this rank
I wanted to make a few small changes to it

the only thing I need from this plugin is that when players enter the top5 it automatically gains VIP

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <csx>
#include <fun>
enum
{
TEAM_UNASSIGNED,
TEAM_T,
TEAM_CT,
TEAM_SPECTATOR
};
public 
plugin_precache(){
precache_model("models/player/guruqa_ct/guruqa_ct.mdl");
precache_model("models/player/guruqa_t/guruqa_t.mdl");
precache_model("models/player/guruqa_joker/guruqa_joker.mdl");
precache_model("models/player/guruqa_punisher/guruqa_punisher.mdl");
precache_model("models/player/guruqa_scream3/guruqa_scream3.mdl");
precache_model("models/player/guruqa_superct/guruqa_superct.mdl");
precache_model("models/player/guruqa_terminator/guruqa_terminator.mdl");
precache_model("models/player/guruqa_robocop/guruqa_robocop.mdl");
precache_model("models/player/guruqa_tfemale/guruqa_tfemale.mdl");
precache_model("models/player/guruqa_ctfemale/guruqa_ctfemale.mdl");
}
new 
hmodel,hadmin;
new 
izStats[8] = {0, ...} 
new 
izBody[8],name[32],iRankPos;
public 
plugin_init(){
register_plugin("Top15 Model + Glow","1.0","Anderson");
register_clcmd("say /model","display_model");
register_clcmd("say_team /model","display_model");
register_clcmd("say /glow","display_glow");
register_clcmd("say_team /glow","display_glow");
register_clcmd("chooseteam","team_join");
hmodel=CreateHudSyncObj();
hadmin=CreateHudSyncObj();
}
public 
team_join(id){
cs_reset_user_model(id);
return 
PLUGIN_CONTINUE;
}
public 
display_model(id){
if(
is_user_alive(id)){
iRankPos get_user_stats(id,izStats,izBody);
get_user_name(id,name,31); 
new 
CsTeams:Team cs_get_user_team(id);
set_hudmessage(255,255,255,0.01,0.6,0,6.0,6.0);
switch (
Team){
case 
TEAM_T:
{
if(
iRankPos <= 15 || get_user_flags(id) & ADMIN_RESERVATION){
new 
menu=menu_create("\rModel \wGuruQA.com\r","menu_modeltr");
menu_additem(menu,"Terminator");
menu_additem(menu,"Joker");
menu_additem(menu,"Scream");
menu_additem(menu,"Jason");
menu_additem(menu,"Woman");
menu_display(id,menu);
}else{
ShowSyncHudMsg(0,hmodel,"%s - entre no Top15!",name);

}
case 
TEAM_CT:
{
if(
iRankPos <= 15 || get_user_flags(id) & ADMIN_RESERVATION){
new 
menu=menu_create("\rModel \wGuruQA.com\r","menu_modelct");
menu_additem(menu,"Robocop");
menu_additem(menu,"Punisher");
menu_additem(menu,"SupercCT");
menu_additem(menu,"Police");
menu_additem(menu,"Woman");
menu_display(id,menu);
}else{
ShowSyncHudMsg(0,hmodel,"%s - entre no Top15!",name);
}
}  
case 
TEAM_SPECTATOR:
{
if(
iRankPos <= 15){
ShowSyncHudMsg(0,hmodel,"%s - entre no jogo!",name);
}else{
ShowSyncHudMsg(0,hmodel,"%s - entre no Top15!",name);
}
}  
}
}
return 
PLUGIN_HANDLED;     
}
public 
menu_modeltr(id,menu,item){
if(
item == MENU_EXIT){
menu_destroy(menu);
return 
PLUGIN_HANDLED;
}
new 
name[32];
get_user_name(id,name,31);
set_hudmessage(random(256),random(256),random(256),-1.0,0.6,2,6.0,6.0,0.1,0.7,2);
switch(
item){
case 
0:
{
cs_set_user_model(id,"guruqa_terminator");
ShowSyncHudMsg(0,hmodel,"%s ganhou o Exterminador!",name);
}
case 
1:
{
cs_set_user_model(id,"guruqa_joker");
ShowSyncHudMsg(0,hmodel,"%s ganhou o Coringa!",name);
}
case 
2:
{
cs_set_user_model(id,"guruqa_scream3");
ShowSyncHudMsg(0,hmodel,"%s ganhou o Panico!",name);
}
case 
3:
{
cs_set_user_model(id,"guruqa_t");
ShowSyncHudMsg(0,hmodel,"%s ganhou o Jason!",name);
}
case 
4:
{
cs_set_user_model(id,"guruqa_tfemale");
ShowSyncHudMsg(0,hmodel,"%s ganhou uma bela mulher!",name);
}
}
menu_destroy(menu);
return 
PLUGIN_HANDLED;
}
public 
menu_modelct(id,menu,item){
if(
item == MENU_EXIT){
menu_destroy(menu);
return 
PLUGIN_HANDLED;
}
new 
name[32];
get_user_name(id,name,31);
set_hudmessage(random(256),random(256),random(256),-1.0,0.6,2,6.0,6.0,0.1,0.7,2);
switch(
item){
case 
0:
{
cs_set_user_model(id,"guruqa_robocop");
ShowSyncHudMsg(0,hmodel,"%s ganhou o Robocop!",name);
}
case 
1:
{
cs_set_user_model(id,"guruqa_punisher");
ShowSyncHudMsg(0,hmodel,"%s ganhou o Justiceiro!",name);
}
case 
2:
{
cs_set_user_model(id,"guruqa_superct");
ShowSyncHudMsg(0,hmodel,"%s ganhou o Super CT!",name);
}
case 
3:
{
cs_set_user_model(id,"guruqa_ct");
ShowSyncHudMsg(0,hmodel,"%s ganhou o Policial!",name);
}
case 
4:
{
cs_set_user_model(id,"guruqa_ctfemale");
ShowSyncHudMsg(0,hmodel,"%s ganhou uma bela mulher!",name);
}
}
menu_destroy(menu);
return 
PLUGIN_HANDLED;
}

public 
display_glow(id){
if(
is_user_alive(id)){
new 
menu=menu_create("\rGlow \wGuruQA.com\r","menu_glow");
menu_additem(menu,"Branco");
menu_additem(menu,"Vermelho");
menu_additem(menu,"Laranja");
menu_additem(menu,"Amarelo");
menu_additem(menu,"Verde");
menu_additem(menu,"Azul claro");
menu_additem(menu,"Azul");
menu_additem(menu,"Rosa");
menu_additem(menu,"Remover Glow");
menu_setprop(menu,MPROP_NEXTNAME,"Mais");
menu_setprop(menu,MPROP_BACKNAME,"Voltar");
menu_setprop(menu,MPROP_EXITNAME,"Sair");
menu_display(id,menu);
}
}
public 
menu_glow(id,menu,item){
set_hudmessage(192,192,192,0.02,0.73,0,6.0,8.0,0.1,0.2,4); 
if(
item == MENU_EXIT){
menu_destroy(menu);
return 
PLUGIN_HANDLED;
}
new 
name[32];
get_user_name(id,name,31);
iRankPos get_user_stats(id,izStats,izBody);     
if(
iRankPos <= 15){
switch(
item){ 
case 
0
{
ShowSyncHudMsg(0,hadmin,"%s ganhou o glow branco!",name);
set_user_rendering(id,kRenderFxGlowShell,192,192,192,kRenderNormal,25);
}
case 
1
{
ShowSyncHudMsg(0,hadmin,"%s ganhou o glow vermelho!",name);
set_user_rendering(id,kRenderFxGlowShell,255,0,0,kRenderNormal,25);
}
case 
2
{
ShowSyncHudMsg(0,hadmin,"%s ganhou o glow laranja!",name); 
set_user_rendering(id,kRenderFxGlowShell,255,140,0,kRenderNormal,25);
}
case 
3
{
ShowSyncHudMsg(0,hadmin,"%s ganhou o glow amarelo!",name); 
set_user_rendering(id,kRenderFxGlowShell,255,255,0,kRenderNormal,25);
}
case 
4:
{
ShowSyncHudMsg(0,hadmin,"%s ganhou o glow verde!",name); 
set_user_rendering(id,kRenderFxGlowShell,0,255,0,kRenderNormal,25);

case 
5
{
ShowSyncHudMsg(0,hadmin,"%s ganhou o glow azul claro!",name); 
set_user_rendering(id,kRenderFxGlowShell,0,255,255,kRenderNormal,25);

case 
6
{  
ShowSyncHudMsg(0,hadmin,"%s ganhou o glow azul!",name);
set_user_rendering(id,kRenderFxGlowShell,0,0,255,kRenderNormal,25);
}
case 
7
{
ShowSyncHudMsg(0,hadmin,"%s ganhou o glow rosa!",name); 
set_user_rendering(id,kRenderFxGlowShell,255,0,255,kRenderNormal,25);
}
case 
8
{
ShowSyncHudMsg(0,hadmin,"%s Removeu o Glow!",name); 
set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderNormal,25);

yRestrict is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Location: Muslim and proud!
Old 02-03-2020 , 14:17   Re: Automatic VIP
Reply With Quote #2

Replace all the

iRankPos <= 15
to..
iRankPos <= 5
__________________
@Jailbreak MOD [Alot of features + API] 100% done !
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
yRestrict
Member
Join Date: Apr 2019
Old 02-03-2020 , 14:20   Re: Automatic VIP
Reply With Quote #3

Quote:
Originally Posted by Natsheh View Post
Replace all the

iRankPos <= 15
to..
iRankPos <= 5
but as I remove glow,
because I wanted to use a separate plugin for the models
yRestrict is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Location: Muslim and proud!
Old 02-03-2020 , 17:15   Re: Automatic VIP
Reply With Quote #4

no offense but your English is so bad i barely can understand you, as you stated in post #3 you want to remove the glow menu ?

what do you mean with you want to use a separate plugin for the models?
__________________
@Jailbreak MOD [Alot of features + API] 100% done !
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 02-03-2020 , 17:16   Re: Automatic VIP
Reply With Quote #5

Quote:
Originally Posted by Natsheh View Post
no offense but your English is so bad i barely can understand you, as you stated in post #3 you want to remove the glow menu ?

what do you mean with you want to use a separate plugin for the models?
Google translate doesn't always work out the way we want it to, lol.
__________________


My Plugins:
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Natsheh
Veteran Member
Join Date: Sep 2012
Location: Muslim and proud!
Old 02-03-2020 , 17:39   Re: Automatic VIP
Reply With Quote #6

Quote:
Originally Posted by Napoleon_be View Post
Google translate doesn't always work out the way we want it to, lol.
google translate is good for one word not for an essay..
__________________
@Jailbreak MOD [Alot of features + API] 100% done !
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 02-03-2020 , 21:12   Re: Automatic VIP
Reply With Quote #7

https://forums.alliedmods.net/showthread.php?t=310322
__________________
iceeedr is offline
Send a message via Skype™ to iceeedr
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 02-09-2020 , 09:52   Re: Automatic VIP
Reply With Quote #8

Quote:
Originally Posted by Natsheh View Post
google translate is good for one word not for an essay..
That's exactly my point.
__________________


My Plugins:
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
tarsisd2
Veteran Member
Join Date: Feb 2016
Location: brazil
Old 02-10-2020 , 08:18   Re: Automatic VIP
Reply With Quote #9

He makes no sense, but what i got from all of this is that he wants top5 to get vip, he wants to remove the models since hes gonna use a different plugin for that, and remove glow, so basic the code he postes is useless.

What do you want the vips to be able to do? Theres a lot of vip plugins around, make a request that makes sense
tarsisd2 is offline
tarsisd2
Veteran Member
Join Date: Feb 2016
Location: brazil
Old 02-10-2020 , 08:28   Re: Automatic VIP
Reply With Quote #10

Something like this
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <csx>
 
#define PLUGIN "VIP 5 Top"
#define VERSION "1.0"
#define AUTHOR "alliedmodder"
new vip_player[5][45

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    new 
stats[8],bodyhits[8],name[32];
    for(new 
i<= 5i++)
    
get_stats(i,stats,bodyhits,name,31,vip_player[i],44)

}


public 
client_putinserver(id)
{
   new 
player_authid[45
   
get_user_authid(idplayer_authid44)
 for(new 
i<= 5i++)
 if(
equal(player_authidvip_player[i]))
 {
  
set_user_flags(id,read_flags("bcim")) // flags you want here
return;
 }


Last edited by tarsisd2; 02-10-2020 at 08:33.
tarsisd2 is offline
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 08:58.


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