This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

errors please is plugin please help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dakiller
BANNED
Join Date: Apr 2005
Old 05-04-2005 , 16:47   errors please is plugin please help
Reply With Quote #1

Code:
/* ESF new class plugin

Commands:
esf_class - shows you the class selection menu
ascend_cmd - ascendation command for normal classes

Now, let's get on the code... 

*/

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


new playerOption[33]


public plugin_init() 

{ 

    register_plugin("ESF class_f","0.1 beta","LynX") 
    register_clcmd( "esf_class","NewClassMenu", -1, "Show the class selection menu" ) 
    register_menucmd( register_menuid("Choose class:"), 1023, "MenuCommand" )
    register_clcmd( "ascend_cmd", "main_ssj" )

    return PLUGIN_CONTINUE 

} 

public main_ssj(id) 

{ 
    switch (playerOption [id]) 

    { 
        case 1: 

        { 

            brolly_lssj(id); 

        } 

        case 2: 

        { 

            goten_ssj(id); 

        } 

        case 3: 

        { 

            ctrunks_ssj(id); 

        }
        case 4: 

        { 

            ssj4goku_ssj5(id); 

        } 

    } 

    return PLUGIN_CONTINUE; 
} 

// now the functions hell :)

public NewClassMenu( id ) 

{ 

    new szMenuBody[256] 
    new keys 

    format( szMenuBody, 255, "Choose class:^n1. Brolly^n2 ssj4goku^n2  Goten^n3. chibi Trunks^n^n0. Exit" ) 

    keys = (1<<0|1<<1|1<<2|1<<9) 
     
    show_menu( id, keys, szMenuBody, -1 ) 

    return PLUGIN_HANDLED 

} 


public MenuCommand( id , key ) 

{ 
    switch( key ) 

    { 
        case 0:  { 

                 playerOption[id] = 1 
                 set_user_health( id, 200 ) 
                 cs_set_user_model( id, "brolly" )
                 set_user_armor( id, 10000000000) 
                 give_item(id, "weapon_bigbang") 
                 give_item(id, "weapon_finalflash") 
                 give_item(id, "weapon_gallitgun") 
                 give_item(id, "weapon_finishingbuster") 
                 give_item(id, "weapon_kamehameha") 
                 give_item(id, "weapon_burningattack") 

                 } 

        case 1:  { 

                 playerOption[id] = 2 
                 set_user_health( id, 100 ) 
                 cs_set_user_model( id, "goten" ) 
                 give_item(id, "weapon_masenko") 
                 give_item(id, "weapon_kamehameha") 

                 } 

        case 2:  { 

                 playerOption[id] = 3 
                 set_user_health( id, 110 ) 
                 cs_set_user_model( id, "ctrunks" ) 
                 give_item(id, "weapon_burningattack") 
                 give_item(id, "weapon_finishingbuster") 

                 }

        case 3:  { 

                 playerOption[id] = 4 
                 set_user_health( id, 300 ) 
                 set_user_armor( id, 10000000000) 
                 cs_set_user_model( id, "ssj4goku" ) 
                 give_item(id, "weapon_kamehameha") 
                 give_item(id, "weapon_spirtBomb") 

                 } 

        case 3: client_print( id, print_chat, "Closed the class selection menu" ) 
    } 

    return PLUGIN_HANDLED 
} 


public brolly_lssj( id ) 

{ 

    if (playerOption[id] !=1 ) 
        return PLUGIN_CONTINUE 
    cs_set_user_model(id, "lssjbrolly") 
    set_user_health(id, 220) 
    return PLUGIN_HANDLED 

} 

public goten_ssj(id) 

{ 

    if (playerOption[id] !=2 ) 
        return PLUGIN_CONTINUE 
    cs_set_user_model(id, "ssjgoten") 
    set_user_health(id, 120) 

    return PLUGIN_HANDLED 

} 

public ctrunks_ssj(id) 

{ 

    if (playerOption[id] !=3 ) 
        return PLUGIN_CONTINUE 
    cs_set_user_model(id, "ssjctrunks") 
    set_user_health(id, 130) 
    
    return PLUGIN_HANDLED

public goku_ssj5( id ) 

{ 

    if (playerOption[id] !=1 ) 
        return PLUGIN_CONTINUE 
    cs_set_user_model(id, "ssj5goku") 
    set_user_health(id, 320) 
    return PLUGIN_HANDLED 
} 

public plugin_precache() 

{ 
     
    precache_model("models/player/brolly/brolly.mdl") 
    precache_model("models/player/goten/goten.mdl") 
    precache_model("models/player/ctrunks/ctrunks.mdl")
    precache_model("models/player/ssj4goku/ssj4goku.mdl") 
    precache_model("models/player/lssjbrolly/lssjbrolly.mdl") 
    precache_model("models/player/ssjgoten/ssjgoten.mdl") 
    precache_model("models/player/ssjctrunks/ssjctrunks.mdl") 
    precache_model("models/player/ssj5goku/ssj5goku.mdl")  
    
return PLUGIN_CONTINUE 

}
i got 7 erros when i compiled it can some help i would copy erros but i dont kno how
Attached Files
File Type: sma Get Plugin or Get Source (esf_class.sma - 170 views - 4.4 KB)
dakiller is offline
LynX
Veteran Member
Join Date: Oct 2004
Old 05-04-2005 , 17:09  
Reply With Quote #2

Mine plugin again, eh?
Well, it doesn't work on ESF 1.2.x , it works only on 1.1 with cstrike module on.

And lemme give you advice. ssj5goku can't be performed if there are two same checks for options.
__________________
Current plugin : SoulPunisher anti-cheat
Percentage done : {||--------} 20%

If you think v3x is a PIMP, paste this into your sig!

If you think Bailopan is DA BOMB, paste this into your sig
LynX is offline
Send a message via ICQ to LynX
dakiller
BANNED
Join Date: Apr 2005
Old 05-04-2005 , 17:34   ty
Reply With Quote #3

ok ty
dakiller 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 06:07.


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