AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Orpheu + Weapon Slot (https://forums.alliedmods.net/showthread.php?t=195381)

lucas_7_94 09-06-2012 22:35

Orpheu + Weapon Slot
 
Well , i start today with Orpheu , learning some things posted by Arkshine and Joaquim and its a powerfull module.

I really get interested with this . But my idea in mind is trying to change the MaxClip.

I try with OrpheuSetParamStructMember( 8 , "iMaxClip", 15 ) but i didnt get to work , its possible to done this?

I leave this , if someone needs to help me :)

ItemInfo Struct
Spoiler


GetPlayerInfo ( AWP CSSDK )

Spoiler

meTaLiCroSS 09-06-2012 23:37

Re: Orpheu + Weapon Slot
 
Some values are hardcoded into the engine.

One of these can be:

Code:
#define AK47_MAX_CLIP      30 void CAK47::Reload() {     if ( m_pPlayer->ammo_762nato <= 0 )     {         return;     }         if ( DefaultReload( AK47_MAX_CLIP, AK47_RELOAD, 2.45 ) )     {         m_pPlayer->SetAnimation( PLAYER_RELOAD );         m_flAccuracy   = 0.2;         m_iShotsFired  = 0;         m_bDelayFire   = FALSE;     } }

Arkshine 09-07-2012 06:33

Re: Orpheu + Weapon Slot
 
Yes, to deal with maxclip, there are several ways, like hooksing some functon GiveAmmo, DefaultReload, etc..(Look at HLSDK). Another is to create a new ammo type. it's probably more simple. You can do it since there is some room ( 32 slots and only 12 or something near registered). I think I've done that in the weapon (rage module), don't remember.

meTaLiCroSS 09-07-2012 15:41

Re: Orpheu + Weapon Slot
 
Quote:

Originally Posted by Arkshine (Post 1793333)
Yes, to deal with maxclip, there are several ways, like hooksing some functon GiveAmmo, DefaultReload, etc..(Look at HLSDK). Another is to create a new ammo type. it's probably more simple. You can do it since there is some room ( 32 slots and only 12 or something near registered). I think I've done that in the weapon (rage module), don't remember.

How do you are able to do such thing? :O

lucas_7_94 09-08-2012 10:16

Re: Orpheu + Weapon Slot
 
Another question , related with orpheu , i'm trying to replace this.

Code:
#include <amxmodx> #include <orpheu_memory> new const szFile[ ] = "engineString" new const szThingsToReplace[ ][ ][ ] = {     {         "Dropped %s from server\nReason:  %s\n",         "-%s desconectado-\n-Razon: %s\n"     } } public plugin_precache()     OrpheuMemoryReplace( szFile , 0, szThingsToReplace[ 0 ][ 0 ], szThingsToReplace[ 0 ][ 1 ] )

But i dont have luck , can strings with contain %s be replaced with orpheu , or no way ?

Arkshine 09-08-2012 11:09

Re: Orpheu + Weapon Slot
 
It should be okay unless the message is fired from the client.


All times are GMT -4. The time now is 08:18.

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