Raised This Month: $319 Target: $400
 79%   Almost there!

Values of the properties


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Plugin ID:
5899
Plugin Version:
1.0.0
Plugin Category:
Technical/Development
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Shows/Changes the properties of entities
    Old 11-04-2017 , 18:02   Values of the properties
    Reply With Quote #1

    Commands:
    • val <name> <type([d|s][i|f|b|s|h|v])> [<value>] - values for You
    • vale <name> <type([d|s][i|f|b|s|h|v])> [<value>] - values for aimed entity
    If you specified a property's value, then you change value of this property, and if you did not specify, you will get the value of this property
    Examples:
    • val m_iMaxHealth di = GetEntProp(client, Prop_Data, "m_iMaxHealth")
    • val m_ArmorValue di 1000 = SetEntProp(client, Prop_Data, "m_ArmorValue", 1000)
      *client = You

    details - soon

    ToDo: Add support for tables
    GitHub
    Attached Files
    File Type: sp Get Plugin or Get Source (properties.sp - 484 views - 9.8 KB)
    __________________

    Last edited by Grey83; 11-04-2017 at 18:13.
    Grey83 is offline
    luki1412
    Veteran Member
    Join Date: Oct 2008
    Location: OnPluginStart()
    Old 11-04-2017 , 18:39   Re: Values of the properties
    Reply With Quote #2

    Useful. How does it handle errors though? Get/Set EntProp functions log errors when you try to access a property that doesnt exist, however the user would get no response.
    __________________
    luki1412 is offline
    Pelipoika
    Veteran Member
    Join Date: May 2012
    Location: Inside
    Old 11-04-2017 , 18:44   Re: Values of the properties
    Reply With Quote #3

    https://forums.alliedmods.net/showthread.php?p=1729015 is better and can automatically guess the type of variable and do way more
    __________________
    Pelipoika is offline
    Grey83
    Veteran Member
    Join Date: Dec 2014
    Location: Ukraine
    Old 11-04-2017 , 23:22   Re: Values of the properties
    Reply With Quote #4

    Pelipoika, ok, FindSendPropInfo() will be added in next bild

    But other functions I have in my other plugins =)
    __________________
    Grey83 is offline
    Grey83
    Veteran Member
    Join Date: Dec 2014
    Location: Ukraine
    Old 11-04-2017 , 23:25   Re: Values of the properties
    Reply With Quote #5

    luki1412, if You try to access a property that doesnt exist, You can see message PrintToChat(client, "\x03[SM] Property \x04%s '%s' \x03does not exist", type[0] == 'd' ? "Prop_Data" : "Prop_Send", name);
    __________________
    Grey83 is offline
    Reply


    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 01:34.


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