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

Showing your legs


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Fun Stuff       
BB.O.
Member
Join Date: Feb 2011
Old 02-28-2015 , 09:28   Showing your legs
Reply With Quote #1

It's just a very simple plugin.
The name of this plugin shows what it does already.

OK. With using this plugin, you can see your legs by looking at your bottom in a first person mode!

The codes might not be so efficient!

Thank you for using this plugin

CT:
[IMG]http://s9.************/po4e5jr17/cs3.jpg[/IMG]
[IMG]http://s9.************/ktap79spn/cs4.jpg[/IMG]

TE Leet's:
[IMG]http://s9.************/j07siy7iz/cs5.jpg[/IMG]


Supported custom mods too!
[IMG]http://s9.************/5cx4wzo2j/cs1.jpg[/IMG]
[IMG]http://s9.************/r1w10uqaj/cs2.jpg[/IMG]

[IMG]http://s9.************/8l1ma1acb/cs6.jpg[/IMG]
[IMG]http://s9.************/mijsfc8ez/cs7.jpg[/IMG]

The demonstration:
Attached Files
File Type: sma Get Plugin or Get Source (showing_feet.sma - 2093 views - 3.2 KB)

Last edited by BB.O.; 03-02-2015 at 05:08. Reason: Made an improvement again
BB.O. is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 02-28-2015 , 09:34   Re: Showing your legs
Reply With Quote #2

Why random_float, random values?
Add some comments if possible. You are using some values that I have no idea what they are. All constants must be either Defined or commented with '//' or '/* */'.

The idea seems really nice, if it works. A picture would look great in your first message.

You can also register a CVar [show_feet_version] for people to be able to view on GameTracker which servers are currently using this.
__________________

Last edited by claudiuhks; 02-28-2015 at 09:36.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 02-28-2015 , 09:35   Re: Showing your legs
Reply With Quote #3

PHP Code:
public zp_user_humanized_post(id)
{
    
set_task(random_float(0.14.0), "update_feet"id)
}

public 
zp_user_infected_post(id)
{
    
set_task(random_float(0.14.0), "update_feet"id)

Why are this zp forwards here ? zombieplague.inc is not included.
Are you sure you are the author of this plugin ?
__________________
HamletEagle is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 02-28-2015 , 09:37   Re: Showing your legs
Reply With Quote #4

Quote:
Originally Posted by HamletEagle View Post
PHP Code:
public zp_user_humanized_post(id)
{
    
set_task(random_float(0.14.0), "update_feet"id)
}

public 
zp_user_infected_post(id)
{
    
set_task(random_float(0.14.0), "update_feet"id)

Why are this zp forwards here ? zombieplague.inc is not included.
Are you sure you are the author of this plugin ?
Zombie Plague INC must not be included. Zombie Plague will automatically execute all forwards in all plug-ins even if they are not defined (their function prototypes).

Also, notice that strlen() returns a size, not just a number. It is never below zero. Just check it with '== 0' or '< 1'.
__________________

Last edited by claudiuhks; 02-28-2015 at 09:40.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
BB.O.
Member
Join Date: Feb 2011
Old 02-28-2015 , 10:16   Re: Showing your legs
Reply With Quote #5

OK. I think out an another solution. Updated the plugin.
BB.O. is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 02-28-2015 , 10:28   Re: Showing your legs
Reply With Quote #6

PHP Code:
    static ent
    ent 
engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target")) 
You must check if the entity is VALID by using pev_valid.
I am pretty sure you might cache 'info_target' Allocated String ID globally.
Also, add '//' comments explaining the following.

PHP Code:
if (angles[0] > 60.0)
angles[0] = 0.0
xs_vec_mul_scalar
(offset, -32.0offset)
xs_vec_mul_scalar(offset0.15offset)
angles[0] = 30.0 
At least, explain what they are/ how they help so I understand.
You didn't have to remove the Zombie Plague forwards if you wish this plug-in to work with Zombie Plague game mod as well.
__________________

Last edited by claudiuhks; 02-28-2015 at 10:29.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
BB.O.
Member
Join Date: Feb 2011
Old 02-28-2015 , 10:36   Re: Showing your legs
Reply With Quote #7

Quote:
Originally Posted by claudiuhks View Post
PHP Code:
    static ent
    ent 
engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target")) 
You must check if the entity is VALID by using pev_valid.
I am pretty sure you might cache 'info_target' Allocated String ID globally.
Also, add '//' comments explaining the following.

PHP Code:
if (angles[0] > 60.0)
angles[0] = 0.0
xs_vec_mul_scalar
(offset, -32.0offset)
xs_vec_mul_scalar(offset0.15offset)
angles[0] = 30.0 
At least, explain what they are/ how they help so I understand.
You didn't have to remove the Zombie Plague forwards if you wish this plug-in to work with Zombie Plague game mod as well.
Sorry for that bro.
I just made the plugin after I thought out an idea.
That's why the plugin is a little bit messy.
It's just a fast script.

I will modifidy it later

Last edited by BB.O.; 02-28-2015 at 10:36.
BB.O. is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 02-28-2015 , 13:26   Re: Showing your legs
Reply With Quote #8

  • Don't comment everything, just the lines which need an explanations or are confusing.
    • PHP Code:
      // The only variable :D 
      How this help peoples to understand ? We all know that you only have a global variable. Anyway, your comment is wrong, this is the only global variable, not the only variable.
  • In your create_feet function static is not needed
  • engfunc(EngFunc_AllocString, "info_target") allocating a string every time is not the best ideea. Idk how many times a player will join(how many times you create that ent), but you should cache this in plugin_init, since this is a constant value for the same string.
  • As claudiuhks said, please explain why you used this "random ?" values.
__________________

Last edited by HamletEagle; 02-28-2015 at 13:27.
HamletEagle is offline
BB.O.
Member
Join Date: Feb 2011
Old 02-28-2015 , 13:39   Re: Showing your legs
Reply With Quote #9

Quote:
Originally Posted by HamletEagle View Post
  • Don't comment everything, just the lines which need an explanations or are confusing.
    • PHP Code:
      // The only variable :D 
      How this help peoples to understand ? We all know that you only have a global variable. Anyway, your comment is wrong, this is the only global variable, not the only variable.
  • In your create_feet function static is not needed
  • engfunc(EngFunc_AllocString, "info_target") allocating a string every time is not the best ideea. Idk how many times a player will join(how many times you create that ent), but you should cache this in plugin_init, since this is a constant value for the same string.
  • As claudiuhks said, please explain why you used this "random ?" values.

::Updated::
Deleted the unneeded comment.
Added a constant storing the string allocation of info_target.

But I get confused why the static variable in the create_feet function should be changed to new?
An entity is created every time when a player joins the server.
If static is changed to new, will AMXX not always allocate a new memory for [ent] when each of the players joins the server?
BB.O. is offline
BB.O.
Member
Join Date: Feb 2011
Old 02-28-2015 , 13:45   Re: Showing your legs
Reply With Quote #10

Quote:
Originally Posted by claudiuhks View Post
PHP Code:
    static ent
    ent 
engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target")) 
You must check if the entity is VALID by using pev_valid.
I am pretty sure you might cache 'info_target' Allocated String ID globally.
Also, add '//' comments explaining the following.

PHP Code:
if (angles[0] > 60.0)
angles[0] = 0.0
xs_vec_mul_scalar
(offset, -32.0offset)
xs_vec_mul_scalar(offset0.15offset)
angles[0] = 30.0 
At least, explain what they are/ how they help so I understand.
You didn't have to remove the Zombie Plague forwards if you wish this plug-in to work with Zombie Plague game mod as well.
At first, I used fw_PlayerSpawn_Post, a very poor way to do the trick.
Changing the models in the same time sucks,
and I'm quite sure that it would carry out a SVC_BAD problem if I'm right..

So that's why I used the random method to prevent the SVC_BAD problem

But it seems it is not needed now for using the new solution

Last edited by BB.O.; 02-28-2015 at 13:47. Reason: something wrong :\
BB.O. 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 05:09.


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