Raised This Month: $ Target: $400
 0% 

Using player_speedmod entity to 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-23-2013 , 14:51   Using player_speedmod entity to players
Reply With Quote #1

!topic Using player_weaponstrip entity for disarm players
--------------------------------



player_speedmod

- To reset all speedmod effects from player, set speed modify value exactly 1.0 *and all flags
- Add either or both speed and suppress effect, set speed modify any other value than 1.0

- These suppress effect will stay on player until he reconnect to server.
- Speed affect as long as player spawn.

PHP Code:
/*
1 : Suppress weapons
2 : Suppress HUD
4 : Suppress jump
8 : Suppress duck
16 : Suppress use
32 : Suppress sprint
64 : Suppress attack
128 : Suppress zoom
*/
#define    Suppress_weapons    (1<<0)
#define    Suppress_HUD        (1<<1)
#define    Suppress_jump        (1<<2)
#define    Suppress_duck        (1<<3)
#define    Suppress_use        (1<<4)
#define    Suppress_sprint    (1<<5)
#define    Suppress_attack    (1<<6)
#define    Suppress_zoom        (1<<7)
#define    Suppress_all        Suppress_weapons|Suppress_HUD|Suppress_jump|Suppress_duck|Suppress_use|Suppress_sprint|Suppress_attack|Suppress_zoom


perform_speedmod(clienttargetlist[], numtargetsFloat:speed=1.0suppress=0)
{
    new 
player_speedmod CreateEntityByName("player_speedmod");

    if(
player_speedmod MaxClients)
    {
        new 
String:buffer[45];
        
Format(buffersizeof(buffer), "%i"suppress);
        
DispatchKeyValue(player_speedmod"spawnflags" buffer);

        
Format(buffersizeof(buffer), "OnUser1 !caller,ModifySpeed,%0.3f,0.1,-1"speed);
        
SetVariantString(buffer);
        
AcceptEntityInput(player_speedmod"AddOutput");

        
SetVariantString("OnUser2 !self,Kill,,0.2,-1");
        
AcceptEntityInput(player_speedmod"AddOutput");
        
AcceptEntityInput(player_speedmod"FireUser2");

        for(new 
0numtargetsi++)
        {
            
AcceptEntityInput(player_speedmod"FireUser1"targetlist[i], client);
        }
    }

+ With this you can block few player actions easily

Last edited by Bacardi; 12-24-2013 at 14:13. Reason: moar info
Bacardi is offline
 


Thread Tools
Display Modes

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 18:28.


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