AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Values of the properties (https://forums.alliedmods.net/showthread.php?t=302622)

Grey83 11-04-2017 18:02

Values of the properties
 
1 Attachment(s)
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 :mrgreen:

ToDo: Add support for tables
GitHub

luki1412 11-04-2017 18:39

Re: Values of the properties
 
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.

Pelipoika 11-04-2017 18:44

Re: Values of the properties
 
https://forums.alliedmods.net/showthread.php?p=1729015 is better and can automatically guess the type of variable and do way more

Grey83 11-04-2017 23:22

Re: Values of the properties
 
Pelipoika, ok, FindSendPropInfo() will be added in next bild

But other functions I have in my other plugins =)

Grey83 11-04-2017 23:25

Re: Values of the properties
 
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);


All times are GMT -4. The time now is 15:21.

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