AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Matrix Jump Plugin Help (https://forums.alliedmods.net/showthread.php?t=85886)

mAr7obg 02-17-2009 11:14

Matrix Jump Plugin Help
 
Please someone help me with this script
I have a server and when someone jumping over the card he gets a prize:)
Please fix commands me to work it comes to these 2 commands
amx_give_matrix
amx_take_matrix
Thanks for your time
Here is the code
Code:

#include <amxmodx>
#include <fakemeta>
#include <fun>
new g_isMatrix[33];
public plugin_init() {
    register_plugin( "Matrix Jump", "1.0", "xPaw" );
    register_forward( FM_PlayerPreThink,    "fwdPlayerPreThink" ); 
    register_event( "DeathMsg",        "evDeath", "a" );
 
    register_clcmd( "+matrix", "togglematrix" );
    register_concmd( "amx_give_matrix", "togglematrix" );
  register_concmd( "amx_take_matrix", "togglematrix" );
}
public fwdPlayerPreThink( id ) {
    if( g_isMatrix[id] ) {
        set_pev( id, pev_sequence,    3 ); 
        set_pev( id, pev_gaitsequence, 9 ); 
        set_pev( id, pev_frame,        1.0 ); 
        set_pev( id, pev_framerate,    1.0 );
    }
}
public togglematrix( id ) {
    if( g_isMatrix[id] ) {
        g_isMatrix[id] = false;
        client_print(id,print_center,"** Matrix jump: OFF **")
        set_user_gravity(id,1.0)
    } else {
        get_user_flags(id, 1);
        g_isMatrix[id] = true;
        client_print(id,print_center,"** Matrix jump: ON **")
        set_user_gravity(id,0.3)
    }
}
public evDeath() {
    new iVictim = read_data( 2 );
 
    g_isMatrix[iVictim] = false;
}



All times are GMT -4. The time now is 16:55.

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