Raised This Month: $ Target: $400
 0% 

NEW! Avatar Mod [ CS 1.6 ] I need some help :S


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Krle
Senior Member
Join Date: Jul 2011
Location: Serbia, Nis
Old 07-31-2011 , 19:25   Re: NEW! Avatar Mod [ CS 1.6 ] I need some help :S
Reply With Quote #1

Ok thanks for the advice Hunter
__________________

Sorry about my BAD English
Krle is offline
Send a message via MSN to Krle
RuleBreaker
Senior Member
Join Date: May 2011
Old 07-31-2011 , 19:52   Re: NEW! Avatar Mod [ CS 1.6 ] I need some help :S
Reply With Quote #2

#include <dhudmessage>

public client_connect (id) {
set_task(2.0, "poruka")
}
public poruka (id) {
set_dhudmessage( red = 0, green = 160, blue = 0, Float = -1.0, Float:y = 0.65, effects = 2, Float:fxtime = 6.0, Float:holdtime = 3.0, Float:fadeintime = 0.1, Float:fadeouttime = 1.5, bool:reliable = false )
show_dhudmessage( index, const message[], any:... )
}

Look here for more info about dhudmessage: http://forums.alliedmods.net/showthread.php?t=149210
RuleBreaker is offline
Krle
Senior Member
Join Date: Jul 2011
Location: Serbia, Nis
Old 07-31-2011 , 20:18   Re: NEW! Avatar Mod [ CS 1.6 ] I need some help :S
Reply With Quote #3

Hvala (Thanks) ^
__________________

Sorry about my BAD English
Krle is offline
Send a message via MSN to Krle
Krle
Senior Member
Join Date: Jul 2011
Location: Serbia, Nis
Old 08-02-2011 , 07:03   Re: NEW! Avatar Mod [ CS 1.6 ] I need some help :S
Reply With Quote #4

Yes its the avatar... So can you help me somehow Im almost getting it Done and making ALPHA version
__________________

Sorry about my BAD English
Krle is offline
Send a message via MSN to Krle
r0ck
Senior Member
Join Date: Jun 2011
Location: India
Old 08-02-2011 , 09:22   Re: NEW! Avatar Mod [ CS 1.6 ] I need some help :S
Reply With Quote #5

Quote:
Originally Posted by Krle View Post
5.Message in HUD shall appear 2-3 sec right after player joins the server, and without tupe-ing /xp and never disappears

PHP Code:
public ShowHud(id
{
    if(
cs_get_user_team(id) == CS_TEAM_CT)
    { 
        
set_hudmessage(42255420.050.2501.01.00.10.2, -1)
        
show_hudmessage(id"[Klasa : %s]^n[Level : %i]^n[Iskustvo : %i / %i]^n[Energija : %i]"CLASSES_CT[PlayerClassCT[id]], PlayerLevel[id], PlayerXP[id], LevelExperience[PlayerLevel[id]], get_user_health(id))
    }
    
    if (
cs_get_user_team(id)  == CS_TEAM_T)
    {
        
set_hudmessage(42255420.050.2501.01.00.10.2, -1)
        
show_hudmessage(id"[Klasa : %s]^n[Level : %i]^n[Iskustvo : %i / %i]^n[Energija : %i]"CLASSES_T[PlayerClassT[id]], PlayerLevel[id], PlayerXP[id], LevelExperience[PlayerLevel[id]],  get_user_health(id))
    }

PHP Code:
public client_putinserver(id)
{
    
set_task(30.0"Help")
    
set_task(5.0"ShowHud"id)

PHP Code:
public Beginning(id)
{
    {
     
//your code 
     //your code 
    
}
    
ShowHud(id)
    return 
PLUGIN_CONTINUE

__________________
Preparing to release my plugins..
r0ck is offline
r0ck
Senior Member
Join Date: Jun 2011
Location: India
Old 08-02-2011 , 09:23   Re: NEW! Avatar Mod [ CS 1.6 ] I need some help :S
Reply With Quote #6

some suggestions add multilang and colorchat
__________________
Preparing to release my plugins..
r0ck is offline
Krle
Senior Member
Join Date: Jul 2011
Location: Serbia, Nis
Old 08-02-2011 , 18:48   Re: NEW! Avatar Mod [ CS 1.6 ] I need some help :S
Reply With Quote #7

Quote:
Originally Posted by r0ck View Post
some suggestions add multilang and colorchat
Ok i don't know about Multilingual, but ColorChat is already included to whole Plugin... Ok rock Thanks! And i did this already, i need just some function that will call ShowHud every 0.1 sec so it like Refreshes and shows exactly HP and XP right afret Player gets or losses it... But without changing color of Hud...

Since version 0.6, im not giving source to any1, but ill give it to you cause i only give source to supporters, as i said on KGB Forum...

Thanks!
__________________

Sorry about my BAD English
Krle is offline
Send a message via MSN to Krle
Krle
Senior Member
Join Date: Jul 2011
Location: Serbia, Nis
Old 08-05-2011 , 19:10   Re: NEW! Avatar Mod [ CS 1.6 ] I need some help :S
Reply With Quote #8

So can anybody help me Fix those Buggy levels... Here is the code:
PHP Code:
CENSURED! PRIVATE CODE
So here is the Problem:
I level up Marine, and i switch to Commander, level is the same as Marine :S
And so for every class. Levels are same...
This is my only-left critical bug HEllp
__________________

Sorry about my BAD English

Last edited by Krle; 08-18-2011 at 01:49.
Krle is offline
Send a message via MSN to Krle
fmfs10
Senior Member
Join Date: Mar 2009
Location: Brasil
Old 08-05-2011 , 19:24   Re: NEW! Avatar Mod [ CS 1.6 ] I need some help :S
Reply With Quote #9

PHP Code:
if(cs_get_user_team(id) == CS_TEAM_CT)
    {
        if(
item == MENU_EXIT)
        {
            
menu_destroy(menu)
            
ColorChat(idGREEN"[Avatar Mod] ^1Zavaram menu...")
        }
        
        new 
szCommand[6]
        new 
szName[64]
        new 
access
        
new callback
        
        menu_item_getinfo 
(menuitemaccessszCommand5szName63callback)
        
        new 
str_to_num(szCommand)
        
        if(
PlayerClassCT[id] != i)
        {
            
PlayerClassCT[id] = i
            ColorChat 
idGREEN"[Avatar Mod] ^1Izabrao si ^3%s"CLASSES_CT[i])
        }
        
        else
        {
            
ColorChat idGREEN"[Avatar Mod] ^1Vec si izabrao ^3%s"CLASSES_CT[i])
        }
        
        
cs_set_user_model(id"avatar")
        
set_user_rendering(id)
        
strip_user_weapons(id)
        
give_item(id"weapon_knife")
        
set_user_gravity(id0.75)
        
        if(
PlayerClassCT[id] == 0)
        {
        }
        
        if(
PlayerClassCT[id] == 1)
        {
            
set_user_health(id2400)
        }
        
        if(
PlayerClassCT[id] == 2)
        {
            
set_user_health(id50)
            
set_user_rendering(idkRenderFxGlowShell000kRenderTransColor0)
        }
        
        if(
PlayerClassCT[id] == 3)
        {
            
set_user_health(id2400)
            
set_user_gravity(id0.5)
        }
        
        if(
PlayerClassCT[id] == 4)
        {
            
set_user_health(id3300)
        }
        
        if(
PlayerClassCT[id] == 5)
        {
            
set_user_health(id1400)
            
set_user_maxspeed(id300.0)
        }
        
        
menu_destroy(menu)
    }
    
    else
    {
        if(
item == MENU_EXIT)
        {
            
menu_destroy(menu)
        }
        
        new 
szCommand[6]
        new 
szName[64]
        new 
access
        
new callback
        
        menu_item_getinfo
(menuitemaccessszCommand5szName63callback)
        
        new 
str_to_num(szCommand)
        
        if(
PlayerClassT[id] != i)
        {
            
PlayerClassT[id] = i;
            
ColorChat(idGREEN"[Avatar Mod] ^1Sada si ^3%s"CLASSES_T[i])
        }
        
        else
        {
            
ColorChat(idGREEN"[Avatar Mod] ^1Vec si ^3%s"CLASSES_T[i])
        }
        
        
cs_set_user_model(id"soldier")
        
set_user_rendering(id)
        
strip_user_weapons(id)
        
set_view(idCAMERA_NONE)
        
        if(
PlayerClassT[id] == 0)
        {
        }
        
        if(
PlayerClassT[id] == 1)
        {
            
give_item(id"weapon_deagle")
            
cs_set_user_bpammo(idCSW_DEAGLE93)
        }
        
        if(
PlayerClassT[id] == 2)
        {
            
give_item(id"weapon_m4a1")
            
cs_set_user_bpammo(idCSW_M4A1170)
        }
        
        if(
PlayerClassT[id] == 3)
        {
            
give_item(id"weapon_awp")
            
cs_set_user_bpammo(idCSW_AWP40)
        }
        
        if(
PlayerClassT[id] == 4)
        {
            
give_item(id"weapon_mp5navy")
            
cs_set_user_bpammo(idCSW_MP5NAVY220)
        }
        
        if(
PlayerClassT[id] == 5)
        {
            
give_item(id"weapon_m249")
            
cs_set_user_bpammo(idCSW_M249400)
        }
        
menu_destroy(menu)

>>>
PHP Code:
if(cs_get_user_team(id) == CS_TEAM_CT)
    {
        if(
item == MENU_EXIT)
        {
            
menu_destroy(menu)
            
ColorChat(idGREEN"[Avatar Mod] ^1Zavaram menu...")
        }
        
        new 
szCommand[6]
        new 
szName[64]
        new 
access
        
new callback
        
        menu_item_getinfo 
(menuitemaccessszCommand5szName63callback)
        
        new 
str_to_num(szCommand)
        
        if(
PlayerClassCT[id] != i)
        {
            
PlayerClassCT[id] = i
            ColorChat 
idGREEN"[Avatar Mod] ^1Izabrao si ^3%s"CLASSES_CT[i])
        }
        
        else
        {
            
ColorChat idGREEN"[Avatar Mod] ^1Vec si izabrao ^3%s"CLASSES_CT[i])
        }
        
        
cs_set_user_model(id"avatar")
        
set_user_rendering(id)
        
strip_user_weapons(id)
        
give_item(id"weapon_knife")
        
set_user_gravity(id0.75)
        

        switch(
PlayerClassCT[id]) {
            
            
//0 isn't necessary... just don't use it
            
case 1: {
                
set_user_health(id2400)
                
PlayerLevel[id] = 0
            
}
            case 
2: {
                
set_user_health(id50)
                
set_user_rendering(idkRenderFxGlowShell000kRenderTransColor0)
                
PlayerLevel[id] = 0
            
}
            case 
3: {
                
set_user_health(id2400)
                
set_user_gravity(id0.5)
                
PlayerLevel[id] = 0
            
}
            case 
4: {
                
set_user_health(id3300)
                
PlayerLevel[id] = 0
            
}
            case 
5: {
                
set_user_health(id1400)
                
set_user_maxspeed(id300.0)
                
PlayerLevel[id] = 0
            
}
        }
        
        
menu_destroy(menu)
}
// DO THE SAME FOR TERRORISTS =D 
SWITCH is better than a "conditional ladder"

Oh and, you should make an API for the plugin, instead of adding the classes in the plugin. So it makes the possibility to add new classes on a separate plugin. Just take a look on Super Hero Mod.

EDIT@
Oh and please a implement the Multi-Language file. It's too difficult to play a game that you don't understand NOTHING from another language lol

EDIT2@
I don't think that PlayerClassT and PlayerClassCT are really necessary... Just use PlayerClass and do a check if the player is CT or TR

Last edited by fmfs10; 08-05-2011 at 19:33.
fmfs10 is offline
Krle
Senior Member
Join Date: Jul 2011
Location: Serbia, Nis
Old 08-05-2011 , 19:40   Re: NEW! Avatar Mod [ CS 1.6 ] I need some help :S
Reply With Quote #10

Okay, thank ya

Ill try it now...

And i will add multilingual, but not for now XD

@Edit do the PlayerLevel[id] = 0 means that the player WILL always start from lvl 0?
__________________

Sorry about my BAD English

Last edited by Krle; 08-05-2011 at 19:43.
Krle is offline
Send a message via MSN to Krle
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 01:10.


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