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

Using player_weaponstrip entity for disarm players


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 12-17-2013 , 09:17   Using player_weaponstrip entity for disarm players
Reply With Quote #1

!topic Using player_speedmod entity to players
-----------------------------------------



player_weaponstrip
cmds:
Strip
StripWeaponsAndSuit


Quick example:
- Creates temporary entity = player_weaponstrip
- Targetname !caller in entity ouput "OnUser1", are targets who fire that input "FireUser1"
- Using client indexs to fire entity input "FireUser1"

- Not necessary need add activators in others AcceptEntityInput... just into firing input.

rest of plugin codes

PHP Code:
perform_weaponstrip(clienttargets[], numtargets)
{
    new 
player_weaponstrip CreateEntityByName("player_weaponstrip");

    if(
player_weaponstrip MaxClients)
    {
        
// In this enity output "OnUser1",
        // a !caller is entity which fire this entity input "FireUser1"
        
SetVariantString("OnUser1 !caller,Strip,,0.1,-1");
        
AcceptEntityInput(player_weaponstrip"AddOutput"player_weaponstrip);

        
// Entity kill itself in under second
        
SetVariantString("OnUser2 !self,Kill,,0.2,-1");
        
AcceptEntityInput(player_weaponstrip"AddOutput"player_weaponstrip);
        
AcceptEntityInput(player_weaponstrip"FireUser2"player_weaponstrip);

        
// In this loop,
        // I fire entity player_weaponstrip input "FireUser1",
        // using my targets as a !caller.
        
for(new 0numtargetsi++)
        {
            
AcceptEntityInput(player_weaponstrip"FireUser1"targets[i], client);
        }
    }

- Have tested in Counter Strike:Source,
maybe works in other games what support this entity.
You can test by open the game, set sv_cheats 1 and load map, type in console input:
ent_info player_weaponstrip
you should get output list in your console.

+ Using this you avoid gamedata files + searching rigth offsets, you know what I mean
+ Let's say, less gamedata file and offsets finding

Last edited by Bacardi; 12-23-2013 at 15:06.
Bacardi is offline
 



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 10:51.


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