Raised This Month: $51 Target: $400
 12% 

[Req] Mission System


Post New Thread Reply   
 
Thread Tools Display Modes
quark
Veteran Member
Join Date: Oct 2011
Location: Your mind.
Old 11-23-2013 , 05:48   Re: [Req] Mission System
Reply With Quote #11

you want it nvault or sql?
__________________

Check out My Plugins:
qServerInfo ; ASKTAG
quark is offline
wTf.
Senior Member
Join Date: Aug 2011
Location: This important?
Old 11-23-2013 , 06:02   Re: [Req] Mission System
Reply With Quote #12

Yes, mission to be registered in nvault.
wTf. is offline
Corner
Junior Member
Join Date: Nov 2013
Old 11-24-2013 , 11:47   Re: [Req] Mission System
Reply With Quote #13

i also want this!
__________________
Corner is offline
wTf.
Senior Member
Join Date: Aug 2011
Location: This important?
Old 12-13-2013 , 05:13   Re: [Req] Mission System
Reply With Quote #14

Up up up
wTf. is offline
wTf.
Senior Member
Join Date: Aug 2011
Location: This important?
Old 01-02-2014 , 06:09   Re: [Req] Mission System
Reply With Quote #15

Bump time
wTf. is offline
wTf.
Senior Member
Join Date: Aug 2011
Location: This important?
Old 01-26-2014 , 07:40   Re: [Req] Mission System
Reply With Quote #16

>>>>>>>>>>>>>>>> UP
wTf. is offline
wTf.
Senior Member
Join Date: Aug 2011
Location: This important?
Old 02-08-2014 , 17:44   Re: [Req] Mission System
Reply With Quote #17

someone a help?
wTf. is offline
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 02-08-2014 , 18:28   Re: [Req] Mission System
Reply With Quote #18

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

#include <amxmodx>
#include <cstrike>
#include <fun>
#include <nvault>

#define PLUGIN "Mission System"
#define VERSION "1.0"
#define AUTHOR "ironskillz1 aka SnusMumrikeN"

new gVault, g_iKillsCount[ 33 ], gSteamID[ 32 ], vKey[ 64 ], vData[ 64 ];

public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    register_event( "DeathMsg", "Event_DeathMsg", "a" );
    register_logevent("Event_RoundStart", 2, "1=Round_Start");
}

public Event_DeathMsg()
{
    new iKiller = read_data(1);
    new iVictim = read_data(2);    
    
    if( 1 <= iKiller <= get_maxplayers() && iVictim != iKiller
    && cs_get_user_team( iVictim ) != cs_get_user_team( iKiller )
    && is_user_alive( iKiller ))
    {
        g_iKillsCount[iKiller]++;
        
        if(g_iKillsCount[iKiller] == 3) 
        {
            set_user_maxspeed(iKiller, 600.0) 
            return PLUGIN_HANDLED;
        }
        else if(g_iKillsCount[iKiller] == 6) 
        {
            set_user_health(iKiller, 200 );
            return PLUGIN_HANDLED;
        }
        else if(g_iKillsCount[iKiller] == 9) 
        {
            set_user_gravity(iKiller, 0.350)
            return PLUGIN_HANDLED;
        }
        else if(g_iKillsCount[iKiller] == 12) 
        {
            set_task(10.0, "Remove_Task", iKiller)
            set_user_rendering( iKiller, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 0 );
            return PLUGIN_HANDLED;
        }
        else if(g_iKillsCount[iKiller] == 15) 
        {
            client_print( iKiller, print_chat, "blablablabla" )
            return PLUGIN_HANDLED;
        }
    }

    return PLUGIN_HANDLED
}

public Remove_Task(iPlayer)
{
    if(task_exists(iPlayer))
        set_user_rendering(iPlayer)  
}

public MissionHud(id) 
{
    id -= 5477;
    set_task(0.6, "MissionHud", id+5477);
    
    if(is_user_connected(id)) 
    {
        if(g_iKillsCount[id] >= 12) 
        {
            set_hudmessage( 70, 130, 180, 0.55, 0.90, 0, 0.4, 0.4, 0.1, 1.5 );
            show_hudmessage( id, "[Mission System] %i/15 Guards kill.", g_iKillsCount[id]);
            return PLUGIN_HANDLED;
        }
        else if(g_iKillsCount[id] >= 9) 
        {
            set_hudmessage( 70, 130, 180, 0.55, 0.90, 0, 0.4, 0.4, 0.1, 1.5 );
            show_hudmessage( id, "[Mission System] %i/12 Guards kill.", g_iKillsCount[id]);
            return PLUGIN_HANDLED;
        }
        else if(g_iKillsCount[id] >= 6) 
        {
            set_hudmessage( 70, 130, 180, 0.55, 0.90, 0, 0.4, 0.4, 0.1, 1.5 );
            show_hudmessage( id, "[Mission System] %i/9 Guards kill.", g_iKillsCount[id]);
            return PLUGIN_HANDLED;
        }
        else if(g_iKillsCount[id] >= 3) 
        {
            set_hudmessage( 70, 130, 180, 0.55, 0.90, 0, 0.4, 0.4, 0.1, 1.5 );
            show_hudmessage( id, "[Mission System] %i/6 Guards kill.", g_iKillsCount[id]);
            return PLUGIN_HANDLED;
        }
        else if(g_iKillsCount[id] <= 2) 
        {
            set_hudmessage( 70, 130, 180, 0.55, 0.90, 0, 0.4, 0.4, 0.1, 1.5 );
            show_hudmessage( id, "[Mission System] %i/3 Guards kill.", g_iKillsCount[id]);
            return PLUGIN_HANDLED;
        }
    }
    return PLUGIN_HANDLED;
}

public Event_RoundStart() 
{    
    new iPlayers[ 32 ], iPlayer, num;
    get_players( iPlayers, num );
    
    for( new i ; i < num ; i ++ )
    {
        iPlayer = iPlayers[ i ];

        set_user_gravity(iPlayer, 1.0)
        set_user_rendering(iPlayer)   
        remove_task(iPlayer)
        
        if( !task_exists( iPlayer + 5477 ))
            MissionHud( iPlayer + 5477 );
    }
    
}

public client_connect( id )
    load_kills( id )

public client_disconnect( id )
    save_kills( id )
        
stock save_kills( index )
{
    gVault = nvault_open( "Mission_System" )
    
    if( gVault == INVALID_HANDLE )
    {
        set_fail_state( "nValut ERROR: =-> Invalid-Handle" )
    }
    
    get_user_authid( index, gSteamID, charsmax( gSteamID ) )
    
    formatex( vKey, charsmax( vKey ), "%sKILLS", gSteamID )
    formatex( vData, charsmax( vData ), "%d", g_iKillsCount[ index ] )
    nvault_set( gVault, vKey, vData )
    nvault_close( gVault )
}

stock load_kills( index )
{
    gVault = nvault_open( "Mission_System" )
    
    if( gVault == INVALID_HANDLE )
    {
        set_fail_state( "nValut ERROR: =-> Invalid-Handle" )
    }
    
    get_user_authid( index, gSteamID, charsmax( gSteamID ) )
    
    formatex( vKey, charsmax( vKey ), "%sKILLS", gSteamID )
    g_iKillsCount[ index ] = nvault_get( gVault, vKey )
    nvault_close( gVault )
}
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
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 22:52.


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