Raised This Month: $51 Target: $400
 12% 

[CSS] 100 balles


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ExtremSystem
New Member
Join Date: Aug 2011
Old 08-30-2011 , 14:10   [CSS] 100 balles
Reply With Quote #1

Hello,

Sorry have to use a translator to my request but I do not speak English well enough for now :/

So, after several searches on the net, I turn to you to ask if it would be possible to make me a plugin that would:

to have 100 bullets in the magazine all the weapons and bullets of 999 reserves throughout the weapons too.

example:

In the M4 at the origin, there are 30 bullets in the magazine and 90 bullets in reserve

And I would like the M4 (and all other weapons) to go 100 bullets in the magazine and 999 bullets in reserve.

Hoping you have understood me and thanking you in advance.

Regards.
ExtremSystem is offline
Paparazziv2
Senior Member
Join Date: Feb 2011
Location: Chile, La Serena
Old 08-30-2011 , 14:55   Re: [CSS] 100 balles
Reply With Quote #2

yes, i need this plugin, but see.. http://forums.alliedmods.net/showthr...37#post1540737
The answer for your request.. sorry .
Paparazziv2 is offline
Send a message via MSN to Paparazziv2
ExtremSystem
New Member
Join Date: Aug 2011
Old 08-30-2011 , 15:05   Re: [CSS] 100 balles
Reply With Quote #3

I've see yesterday one server with this plugin/add-on but no admin in this server :/
ExtremSystem is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 08-30-2011 , 15:14   Re: [CSS] 100 balles
Reply With Quote #4

aahh... I guess weapon clip size can change from weapon files.
Those locate ...orangebox\cstrike\scripts\*.ctx (weapon_ak47.ctx, weapon_m4a1.ctx, etc etc)
But these files need convert to txt file, edit and convert back ctx file.

I just tested and it works but one big problem.
Server files need match players files,
so if you edit weapons features (clip size, prize, dmg, etc etc) from *.ctx, player need same fiels and you can't force players download those files automatically when join server.


There is however one extension, bu I didn't get it work.
[EXTENSION ALL] CTX editor (For anything/everything)


Dam, I think I founded right offset. I peek from DarthNinja plugin [TF2] Set Ammo [v1.0.0]
PHP Code:
FindSendPropInfo("CWeaponCSBase""m_iClip1"); 
But it reset clip size back normal when reload...
*
but you can set, how much player can get ammo when buy weapon.
Code:
"ammo_50AE_max" = "35"
 game replicated
"ammo_762mm_max" = "90"
 game replicated
"ammo_556mm_max" = "90"
 game replicated
"ammo_556mm_box_max" = "200"
 game replicated
"ammo_338mag_max" = "30"
 game replicated
"ammo_9mm_max" = "120"
 game replicated
"ammo_buckshot_max" = "32"
 game replicated
"ammo_45acp_max" = "100"
 game replicated
"ammo_357sig_max" = "52"
 game replicated
"ammo_57mm_max" = "100"
 game replicated
"ammo_hegrenade_max" = "1"
 game replicated
"ammo_flashbang_max" = "2"
 game replicated
"ammo_smokegrenade_max" = "1"
 game replicated
__________________
Do not Private Message @me

Last edited by Bacardi; 08-30-2011 at 15:50.
Bacardi is offline
ExtremSystem
New Member
Join Date: Aug 2011
Old 08-30-2011 , 15:41   Re: [CSS] 100 balles
Reply With Quote #5

Code:
#include <sourcemod>

/*
thx to Infinite Ammo by twistedeuphoria - http://forums.alliedmods.net/showthread.php?t=55381
*/

public Plugin:myinfo = {
    name = "Ammo Script for Zombie:Reloaded",
    author = "[SG-10]Cpt.Moore, Richard Helgeby, Kyle Sanderson",
    description = "Sets 100 bullets to the active weapon at a certain interval.",
    version = "2.1",
    url = "http://jupiter.swissquake.ch/zombie/page"
};

new activeOffset = -1;
new clip1Offset = -1;
new clip2Offset = -1;
new secAmmoTypeOffset = -1;
new priAmmoTypeOffset = -1;

//new Handle:hTimer;
new Handle:cvarInterval;
new Handle:AmmoTimer;

public OnPluginStart()
{
    cvarInterval = CreateConVar("zr_ammo_interval", "999", "How often to reset ammo (in seconds).", _, true, 1.0);
    AutoExecConfig(true, "plugin.zr_ammo");

    activeOffset = FindSendPropOffs("CAI_BaseNPC", "m_hActiveWeapon");
    
    clip1Offset = FindSendPropOffs("CBaseCombatWeapon", "m_iClip1");
    clip2Offset = FindSendPropOffs("CBaseCombatWeapon", "m_iClip2");
    
    priAmmoTypeOffset = FindSendPropOffs("CBaseCombatWeapon", "m_iPrimaryAmmoCount");
    secAmmoTypeOffset = FindSendPropOffs("CBaseCombatWeapon", "m_iSecondaryAmmoCount");
}

public OnConfigsExecuted()
{
    if (AmmoTimer != INVALID_HANDLE) {
        KillTimer(AmmoTimer);
    }
    new Float:interval = GetConVarFloat(cvarInterval);
    AmmoTimer = CreateTimer(interval, ResetAmmo, _, TIMER_REPEAT);
}

public Action:ResetAmmo(Handle:timer)
{
    for (new client = 1; client <= MaxClients; client++)
    {
        if (IsClientConnected(client) && !IsFakeClient(client) && IsClientInGame(client) && IsPlayerAlive(client))
        {
            Client_ResetAmmo(client);
        }
    }
}

public Client_ResetAmmo(client)
{
    new zomg = GetEntDataEnt2(client, activeOffset);
    if (clip1Offset != -1 && zomg != -1)
        SetEntData(zomg, clip1Offset, 100, 4, true);
    if (clip2Offset != -1 && zomg != -1)
        SetEntData(zomg, clip2Offset, 100, 4, true);
    if (priAmmoTypeOffset != -1 && zomg != -1)
        SetEntData(zomg, priAmmoTypeOffset, 100, 4, true);
    if (secAmmoTypeOffset != -1 && zomg != -1)
        SetEntData(zomg, secAmmoTypeOffset, 100, 4, true);
}
what do you think to sp?
ExtremSystem is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 08-30-2011 , 16:16   Re: [CSS] 100 balles
Reply With Quote #6

Don't know that but I think I get extension [EXTENSION ALL] CTX editor (For anything/everything) work.
Can even create whole new "weapon mod" plugin

I start play with this tomorrrow
__________________
Do not Private Message @me
Bacardi is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 08-30-2011 , 16:42   Re: [CSS] 100 balles
Reply With Quote #7

Try this, I made quick.
So when you have loaded this plugin, it set all weapons clip size to 100.
It not now reset back normal until you remove plugin and reboot server.
(I was lazy, I made this quick)
Then set rest ammo using cvars what I posted earlier #4

*edit
Included ctx extension+gamedata, plugin source code and plugin.
credits to Swixel

*edit edit
Simple plugin, no configurations.

*UPDATE
Made cvar
Quote:
sm_clipsize_100_enable 0
// When enabled, change all weapons clip size 100
Now it reset clip size on all weapons, use cvar in map configs.

Added log action in SM logs everytime when clip size change, happens when cvar new value different than old value.For debugging if server start crash.
(It spam twice on maps with map config, because server.cfg reset cvar back and map config enabled it after. Ignored it)

Code:
L 09/07/2011 - 10:19:39: -------- Mapchange to de_dust --------
L 09/07/2011 - 10:19:39: [clipsize_100.smx] Changed sm_clipsize_100_enable 0
L 09/07/2011 - 10:19:39: [clipsize_100.smx] Changed sm_clipsize_100_enable 1
Attached Files
File Type: zip css_clipsize_100.zip (13.6 KB, 372 views)
__________________
Do not Private Message @me

Last edited by Bacardi; 09-07-2011 at 03:24.
Bacardi is offline
ExtremSystem
New Member
Join Date: Aug 2011
Old 09-01-2011 , 20:52   Re: [CSS] 100 balles
Reply With Quote #8

i've found

Place all the txt file in this folder: cstrike\script:

http://www.multiupload.com/DVYN43K8S5

They work on my server ^^
ExtremSystem is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 09-01-2011 , 23:19   Re: [CSS] 100 balles
Reply With Quote #9

Quote:
Originally Posted by ExtremSystem View Post
i've found

Place all the txt file in this folder: cstrike\script:

http://www.multiupload.com/DVYN43K8S5

They work on my server ^^
I'll be damned! It works.
And those txt files are converted from ctx files, haven't clue that server use also those txt files. Good finding.
__________________
Do not Private Message @me
Bacardi is offline
Paparazziv2
Senior Member
Join Date: Feb 2011
Location: Chile, La Serena
Old 09-03-2011 , 21:05   Re: [CSS] 100 balles
Reply With Quote #10

thanks for all people, but i open a thread and i received one answer, othe person open a thread and received the plugin. what is the problem with me?.. sorry ajajaa thanks XD!.
Edit: The link of the plugin, all in one and all perfect works?.
But bacardi post a .zip but extremSystem send a .txt files for convert to CTX files?, how to i made it?
I need the link with the plugin working, and need all files in a one link, for example i unzip all files in addons and all files are put in their respective folders






not my fault the way in which I express myself, it sounds as if you were sending, but use the google translator and it sounds like I'm sending just ask someone to send me the link for everyone, as some like us do not understand very good and just want to download the file and leave it as I said.
Sorry and thank you for understanding

Last edited by Paparazziv2; 09-03-2011 at 21:17.
Paparazziv2 is offline
Send a message via MSN to Paparazziv2
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 09:14.


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