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

Admin & Vip Customization Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DeeKeiD
Member
Join Date: Apr 2008
Location: Latvia
Old 04-05-2008 , 11:23   Admin & Vip Customization Plugin
Reply With Quote #1

Hello, i'm noob in amxx scripting i need help with my plugin(Remake of Alka's Plugin)
Here's the code :
Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
 
#define PLUGIN "Admin & Vip Customization"
#define VERSION "0.1"
#define AUTHOR "DeeKeiD"
 
 // Half of code taken from Alkas Custom Admin\Vip Plugin
 
public plugin_init() {
 
 register_plugin(PLUGIN, VERSION, AUTHOR);
}
 
public client_putinserver(id) //"client_connect" is to earlyer...
{
 if((get_user_flags(id) & ADMIN_LEVEL_B))
 {
  new name[32];
  get_user_name(id, name, sizeof name - 1);
 
  set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 3.0, 7.0);
  show_hudmessage(0, "Admin %s joined on the server!", name); // Welcome message
 }
 else if((get_user_flags(id) & ADMIN_LEVEL_C))
 {
  new name[32];
  get_user_name(id, name, sizeof name - 1);
  set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 3.0, 7.0);
  show_hudmessage(0, "V.I.P %s joined on the server!", name); // Welcome Message
  client_print(id,print_chat,"Welcome back sir!"); // Private welcome message
  cs_set_user_model(id, "vip"); // change of player model to custom(vip)
  cs_set_user_deaths(id, 1337); // set player deaths to 1337
  cs_set_user_money(id , 1337); // set player money to 1337
 }
}
Works :
Quote:
1. Welcome HUD Message
2. Player Glow
Doesent work's :
Quote:
1. Change of user model to custom(vip)...
2. Setting user deaths to 1337
3. Setting user money to 1337
Things i whant to add but don't know how :
Quote:
1. Playing custom sound when player connects
Can someone tell me what i'm doing wrong and how to make it work? Thx.
DeeKeiD is offline
rudle
BANNED
Join Date: Mar 2008
Location: About to be sent to bant
Old 04-05-2008 , 15:17   Re: Admin & Vip Customization Plugin
Reply With Quote #2

This should work Edited Added sound.
I did 1 2 3 and the thing you didn't know how to do.
Code:
#include <amxmodx> #include <amxmisc> #include <cstrike>   #define PLUGIN "Admin & Vip Customization" #define VERSION "0.1" #define AUTHOR "DeeKeiD"    // Half of code taken from Alkas Custom Admin\Vip Plugin   public plugin_init() {    register_plugin(PLUGIN, VERSION, AUTHOR); } public plugin_precache() {      precache_sound("misc/vip.wav");      precache_sound("misc/admin.wav");     } public client_putinserver(id) //"client_connect" is to earlyer... {  if((get_user_flags(id) & ADMIN_LEVEL_B))  {   new name[32];   get_user_name(id, name, sizeof name - 1);     set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 3.0, 7.0);   show_hudmessage(0, "Admin %s joined on the server!", name); // Welcome message   client_cmd(id, "spk misc/admin.wav")  }  else if((get_user_flags(id) & ADMIN_LEVEL_C))  {   new name[32];   get_user_name(id, name, sizeof name - 1);   set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 3.0, 7.0);   show_hudmessage(0, "V.I.P %s joined on the server!", name); // Welcome Message   client_print(id,print_chat,"Welcome back sir!"); // Private welcome message   cs_set_user_model(id, "vip/vip.mdl"); // change of player model to custom(vip)   cs_get_user_money(id)   cs_get_user_deaths(id)   cs_set_user_deaths(id, 1337); // set player deaths to 1337   cs_set_user_money(id , 1337); // set player money to 1337   client_cmd(id, "spk misc/vip.wav")  } }

Last edited by rudle; 04-05-2008 at 15:23.
rudle is offline
DeeKeiD
Member
Join Date: Apr 2008
Location: Latvia
Old 04-06-2008 , 08:42   Re: Admin & Vip Customization Plugin
Reply With Quote #3

it isn't working ;[
DeeKeiD is offline
rudle
BANNED
Join Date: Mar 2008
Location: About to be sent to bant
Old 04-06-2008 , 09:14   Re: Admin & Vip Customization Plugin
Reply With Quote #4

Did you change it and make sure you have the sound?
rudle is offline
DeeKeiD
Member
Join Date: Apr 2008
Location: Latvia
Old 04-06-2008 , 09:28   Re: Admin & Vip Customization Plugin
Reply With Quote #5

yes, i changed it and i have sound in my game & server folders
DeeKeiD is offline
rudle
BANNED
Join Date: Mar 2008
Location: About to be sent to bant
Old 04-06-2008 , 09:46   Re: Admin & Vip Customization Plugin
Reply With Quote #6

Change
Code:
vip/vip.mdl
to
Code:
models/vip/vip.mdl
Sorry forgot about that
rudle is offline
DeeKeiD
Member
Join Date: Apr 2008
Location: Latvia
Old 04-06-2008 , 09:53   Re: Admin & Vip Customization Plugin
Reply With Quote #7

changed, still not working
DeeKeiD is offline
rudle
BANNED
Join Date: Mar 2008
Location: About to be sent to bant
Old 04-06-2008 , 12:41   Re: Admin & Vip Customization Plugin
Reply With Quote #8

Does the user have flag C
and change this
&
to
&&
Code:
 else if((get_user_flags(id) && ADMIN_LEVEL_C))
Code:
{
 if((get_user_flags(id) && ADMIN_LEVEL_B))
rudle is offline
SchlumPF*
Veteran Member
Join Date: Mar 2007
Old 04-06-2008 , 12:45   Re: Admin & Vip Customization Plugin
Reply With Quote #9

cs_set_user_model(id, "vip");

just the model name without .mdl
__________________
SchlumPF* is offline
Send a message via ICQ to SchlumPF*
rudle
BANNED
Join Date: Mar 2008
Location: About to be sent to bant
Old 04-06-2008 , 14:47   Re: Admin & Vip Customization Plugin
Reply With Quote #10

Quote:
Originally Posted by SchlumPF* View Post
cs_set_user_model(id, "vip");

just the model name without .mdl
He did that last time look at his code before post ill test on my server okt
then send you the working code.
rudle 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 23:25.


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