Raised This Month: $ Target: $400
 0% 

[Request] Block Usp Damage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 10-08-2021 , 11:02   Re: [Request] Block Usp Damage
Reply With Quote #3

@DJ, this isn't going to work like you expect it to.

PHP Code:
#define ent create_entity("game_player_equip")
DispatchKeyValueent"item_assaultsuit""1" ) && DispatchKeyValueent"weapon_knife""1" ) && DispatchKeyValueent"weapon_elite""5" ) && DispatchSpawn(ent); 
Translates into

PHP Code:
DispatchKeyValuecreate_entity("game_player_equip"), "item_assaultsuit""1" ) && DispatchKeyValuecreate_entity("game_player_equip"), "weapon_knife""1" ) && DispatchKeyValuecreate_entity("game_player_equip"), "weapon_elite""5" ) && DispatchSpawn(create_entity("game_player_equip")); 
Every single time you reference "ent" you are creating a new entity so obviously, that can't work. Plus, there is no reason to write one-liners like that and you aren't writing functional code where everything needs to be an expression. Just write a proper block of code:

PHP Code:

public plugin_precache()
{
    new 
ent create_entity("game_player_equip")
    
DispatchKeyValueent"item_assaultsuit""1" )
    
DispatchKeyValueent"weapon_knife""1" )
    
DispatchKeyValueent"weapon_elite""5" )
    
DispatchSpawn(ent);

__________________
HamletEagle 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 23:57.


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