AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Orpheu - Problems with HAM - GiveAmmo - And what the hell is Think? (https://forums.alliedmods.net/showthread.php?t=164115)

sake 08-07-2011 12:43

Orpheu - Problems with HAM - GiveAmmo - And what the hell is Think?
 
Hello there,

Would it be a problem, if I do sth like this:

PHP Code:

ExecuteHam(Ham_GiveAmmoid200"50ae"200); 

If the weapon has a maximum Ammo count of 35? (In this case it's the Deagle).

sake 08-07-2011 12:58

Re: Could this be crash happy?
 
And another thing. I've been using this

PHP Code:

dllfunc(DLLFunc_Thinkid); 

in order to respawn with FakeMeta, but what the hell is Thinking?

Hunter-Digital 08-08-2011 09:35

Re: Problems with HAM - GiveAmmo - And what the hell is Think?
 
The HUD has a display limit of 255 for bpammo (I think) and 127 for clip ammo, memory holder is bigger than that.
And I don't really know how ham gives ammo but if it just "gives" player the ammo and doesn't forcely sets the ammo, it will limited to 35...
But why don't you just test it, what's the problem ?

On "think", I can't really tell you anything certain there.

Also, stop persisting on your threads.

sake 08-08-2011 09:57

Re: Problems with HAM - GiveAmmo - And what the hell is Think?
 
It forcely sets the ammo. And it did work quite fine until I found some debug messages that stopped occuring after I changed it, but I'm not completely sure. The call is like this:

ExecuteHam(Ham_GiveAmmo, PlayerID, AMMOTOGIVE, "AMMONAMESTRING", AMMOMAX);

What do you mean by persisting on your threads? Stop bumping? Hmm. Then sorry about that :(

Exolent[jNr] 08-08-2011 10:06

Re: Problems with HAM - GiveAmmo - And what the hell is Think?
 
Quote:

Originally Posted by sake (Post 1528161)
Nobody here?

Don't bump until 2 weeks have passed since last post.

sake 08-08-2011 13:20

Re: Problems with HAM - GiveAmmo - And what the hell is Think?
 
Another thing I couldn't figure out. I am trying to use GiveAmmo directly from the game without the need of using HAM.

PHP Code:

{
    
"name" "giveAmmo",
    
"class" "CBasePlayer",
    
"library" "mod",
    
"arguments" :
    [
    {
        
"type" "int",
        
"info" "ammo"
    
},
    {
        
"type" "char *",
        
"info" "Ammo Name"
    
},
    {
        
"type" "int",
        
"info" "ammomax"
    
}
    ],
    
"indexes":
    [
        {
            
"os" "windows",
            
"mod" "cstrike",
            
"value" 15
        
},
        {
            
"os" "linux",
            
"mod" "cstrike",
            
"value" 16
        
}
    ]


This is the giveAmmo File. The Call works but I don't get any ammo. What do I have to pass as second parameter in order to get for example "556nato" - Ammo?

EDIT: Didn't count right. Will let you know if that was the problem.

EDIT: Yep, Works :).

ARES[ro] 08-08-2011 15:57

Re: Orpheu - Problems with HAM - GiveAmmo - And what the hell is Think?
 
PHP Code:

set_pev(idpev_deadflagDEAD_RESPAWNABLE)
dllfunc(DLLFunc_Thinkid

Well once a players dead the server stops sending a thread over his player entity to "think" it. By setting his flags to spawnable, the next think that sees that flag will spawn him. And what you are doing is kinda "cheating the standards of cs" and forcing a think frame on him before the standard ones would go. (the standard ones would be on next round start when you will respawn normally).
cheating the standards of cs = modding
so its all good baby

Exolent[jNr] 08-08-2011 16:06

Re: Orpheu - Problems with HAM - GiveAmmo - And what the hell is Think?
 
Quote:

Originally Posted by ARES[ro] (Post 1528486)
(the standard ones would be on next round start when you will respawn normally)

Actually, a player still thinks while dead.

bibu 08-08-2011 16:22

Re: Orpheu - Problems with HAM - GiveAmmo - And what the hell is Think?
 
Why don't you use cs_set_user_bpammo ?

sake 08-08-2011 16:34

Re: Orpheu - Problems with HAM - GiveAmmo - And what the hell is Think?
 
Isn't Orpheu more efficient due to using native Cstrike functions? Or does the Cstrike module just do the same?


All times are GMT -4. The time now is 03:19.

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