Raised This Month: $ Target: $400
 0% 

Help from pro scriptters plzz :(


Post New Thread Reply   
 
Thread Tools Display Modes
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-28-2011 , 17:02   Re: Help from pro scriptters plzz :(
Reply With Quote #11

lol, no.

Don't change the function.
You're supposed to call it.

Code:
public yourFunctionHere(id) {     ShowWeaponPickup(id, CSW_M4A1); } stock ShowWeaponPickup(id, iWeaponId) {     static iMsgWeaponPickup;         if(!iMsgWeaponPickup)         iMsgWeaponPickup = get_user_msgid("WeapPickup");             message_begin(MSG_ONE_UNRELIABLE, iMsgWeaponPickup, _, id);     write_byte(iWeaponId);     message_end(); }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 06-28-2011 , 21:47   Re: Help from pro scriptters plzz :(
Reply With Quote #12

Quote:
Originally Posted by Exolent[jNr] View Post
Actually, the color depends on the backpack ammo in the weapon.
Oh, nice to know.
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-28-2011 , 22:26   Re: Help from pro scriptters plzz :(
Reply With Quote #13

Here's an example where you can set the color:
Code:
stock ShowWeaponPickup(id, iWeaponId, bool:bYellow=true) // set bYellow to false for red color {     bYellow = !!bYellow; // clamp to 0/1         static iMsgWeaponPickup;         if(!iMsgWeaponPickup)         iMsgWeaponPickup = get_user_msgid("WeapPickup");         new ammo = cs_get_user_bpammo(id, iWeaponId);         if((ammo > 0) != bYellow)     {         cs_set_user_bpammo(id, iWeaponId, _:bYellow);     }             message_begin(MSG_ONE_UNRELIABLE, iMsgWeaponPickup, _, id);     write_byte(iWeaponId);     message_end();         if((ammo > 0) != bYellow)     {         cs_set_user_bpammo(id, iWeaponId, ammo);     } }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Old 06-29-2011, 11:41
pain00
This message has been deleted by pain00.
pain00
Member
Join Date: May 2007
Old 06-29-2011 , 11:47   Re: Help from pro scriptters plzz :(
Reply With Quote #14

thnx , should i only copy and paste that ?
pain00 is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 06-29-2011 , 11:49   Re: Help from pro scriptters plzz :(
Reply With Quote #15

Quote:
Originally Posted by drekes View Post
tell us exactly what you're looking for & someone can make it for you.
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
pain00
Member
Join Date: May 2007
Old 06-29-2011 , 11:52  
Reply With Quote #16

I want the hud sprite still in screen hole play time ,

I want a plugin that draw Side Hud sprite for all weapons i already has , hole time play ... and never hide. untill change other weapon ,,, thats all

ex. I have AK47 AND Deagle , so AK AND deagle will draw in side all time ,, like this for all weapons

Last edited by Exolent[jNr]; 06-29-2011 at 13:26. Reason: Merged posts.
pain00 is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 06-29-2011 , 12:03   Re: Help from pro scriptters plzz :(
Reply With Quote #17

@pain00
Use the edit button.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
Old 07-03-2011, 11:44
pain00
This message has been deleted by Exolent[jNr]. Reason: Don't bump until 2 weeks have passed since last post.
pain00
Member
Join Date: May 2007
Old 07-03-2011 , 12:30   Re: Help from pro scriptters plzz :(
Reply With Quote #18

Quote:
Originally Posted by Exolent[jNr] View Post
Here's an example where you can set the color:
Code:
stock ShowWeaponPickup(id, iWeaponId, bool:bYellow=true) // set bYellow to false for red color { bYellow = !!bYellow; // clamp to 0/1 static iMsgWeaponPickup;

if(!iMsgWeaponPickup) iMsgWeaponPickup = get_user_msgid("WeapPickup");

new ammo = cs_get_user_bpammo(id, iWeaponId);

if((ammo > 0) != bYellow) { cs_set_user_bpammo(id, iWeaponId, _:bYellow);
} message_begin(MSG_ONE_UNRELIABLE, iMsgWeaponPickup, _, id);
write_byte(iWeaponId);
message_end();

if((ammo > 0) != bYellow) { cs_set_user_bpammo(id, iWeaponId, ammo);
} }


I tried this code but has no effect
pain00 is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 07-03-2011 , 13:14   Re: Help from pro scriptters plzz :(
Reply With Quote #19

I've been working on this but it has 1 problem.
I'm using a task to draw the icon but it seems to put the new one above the old one.

Not good at explaining it, screenshot attached.

This is what i got so far:

PHP Code:
#include <amxmodx>
#include <cstrike>

#pragma semicolon    1
#define VERSION        "1.0.0"

new g_iWeapons[33][2];


public 
plugin_init()
{
    
register_plugin("Weapon Info"VERSION,    "Drekes");
    
    
register_event("CurWeapon""EventCurWeapon""be""1=1");
    
register_event("DeathMsg""EventDeathMsg""a");
    
    
register_clcmd("drop""CmdDrop");
    
    
set_task(2.0"TaskDrawWeaponIcons", .flags "b");
}


public 
EventCurWeapon(id)
{
    new 
iWeapon read_data(2);
    
    
// These don't seem to work in the switch(iWeapon)
    
if(g_iWeapons[id][0] == iWeapon || g_iWeapons[id][1] == iWeapon)
        return 
PLUGIN_CONTINUE;
        
    switch(
iWeapon)
    {
        case 
CSW_KNIFECSW_C4CSW_SMOKEGRENADECSW_FLASHBANGCSW_HEGRENADE
            return 
PLUGIN_CONTINUE;
        
        default:
        {
            
g_iWeapons[id][1] = g_iWeapons[id][0];
            
g_iWeapons[id][0] = iWeapon;
        }
    }
    
    return 
PLUGIN_CONTINUE;
}


public 
CmdDrop(id)
{
    new 
iWeapon get_user_weapon(id);
    
    for(new 
0sizeof(g_iWeapons[]); i++)
    {
        if(
iWeapon == g_iWeapons[id][i])
        {
            
g_iWeapons[id][i] = 0;
            
            break;
        }
    }
}


public 
EventDeathMsg()
    
arrayset(g_iWeapons[read_data(1)], 0sizeof(g_iWeapons[]));


public 
TaskDrawWeaponIcons()
{
    static 
iPlayers[32], iNumiPlayerij;
    
get_players(iPlayersiNum"ach");
    
    if(!
iNum)
        return;
    
    for(
0iNumi++)
    {
        
iPlayer iPlayers[i];
        
        for(
0sizeof(g_iWeapons[]); j++)
        {
            if(
g_iWeapons[iPlayer][j])
                
ShowWeaponPickup(iPlayerg_iWeapons[iPlayer][j], true);
        }
    }
}


stock ShowWeaponPickup(idiWeaponIdbool:bYellow=true// set bYellow to false for red color 
{    
    
bYellow = !!bYellow// clamp to 0/1   
    
    
static iMsgWeaponPickup;         
    if(!
iMsgWeaponPickup)        
        
iMsgWeaponPickup get_user_msgid("WeapPickup");   

    new 
ammo cs_get_user_bpammo(idiWeaponId);  

    if((
ammo 0) != bYellow)    
    {       
        
cs_set_user_bpammo(idiWeaponId_:bYellow);   
    }           

    
message_begin(MSG_ONE_UNRELIABLEiMsgWeaponPickup_id);
    
write_byte(iWeaponId);   
    
message_end();        

    if((
ammo 0) != bYellow)    
    {        
        
cs_set_user_bpammo(idiWeaponIdammo);    
    }

I've tried blocking the original message, which didn't change anything
and i've messed around with the task delay, but it doesn't seem to the best way since the draw time is based on a client's cvar.
Attached Thumbnails
Click image for larger version

Name:	de_airstrip0001.jpg
Views:	94
Size:	73.1 KB
ID:	88463  
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
pain00
Member
Join Date: May 2007
Old 07-03-2011 , 14:03   Re: Help from pro scriptters plzz :(
Reply With Quote #20

Can you remove the hide of hud sprite , if this possible that case no need to draw more hud sprites

Last edited by pain00; 07-03-2011 at 14:20.
pain00 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 00:12.


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