Raised This Month: $ Target: $400
 0% 

Change plugin vip


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Torge
Veteran Member
Join Date: Oct 2011
Old 08-25-2012 , 09:01   Re: Change plugin vip
Reply With Quote #2

Try this, you forgot to add 'cstrike' 'fun' and 'hamsandwich'.
By the way, you can ignore loose identation:

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#include <amxmisc>

#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Author"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /vip""Motd");
    
RegisterHam(Ham_Spawn"player""Spawn"1);
}

public 
Spawn(id) {
    new 
GetFlags get_user_flags(id);
    
    if(
is_user_alive(id)) {
        if (
GetFlags ADMIN_LEVEL_F) {
                 
set_task(0.5"iScoreBoard"id 6969)
                 
set_task(1.0"give"id)

             }
         }
}

public 
iScoreBoard(tID) {
    new 
id tID 6969
    
    message_begin
(MSG_ALLget_user_msgid("ScoreAttrib"));
    
write_byte(id);
    
write_byte(4);
    
message_end();
}

public 
give(id) {
set_user_health(id150);
    
cs_set_user_armor(id150CS_ARMOR_VESTHELM);
    
give_item(id"weapon_hegrenade");
    
give_item(id"weapon_flashbang");
    
give_item(id"weapon_smokegrenade");
    
cs_set_user_bpammo(idCSW_FLASHBANG3);
    
cs_set_user_bpammo(idCSW_SMOKEGRENADE3);
}

public 
Motd(id) {
    new 
iCfgDir[32], iFile[192];
    
    
get_configsdir(iCfgDircharsmax(iCfgDir));
    
formatex(iFilecharsmax(iFile), "%s/vip.html"iCfgDir);

    
show_motd(idiFile"Your title");


Last edited by Torge; 08-25-2012 at 09:59.
Torge is offline
 



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 05:44.


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