Raised This Month: $ Target: $400
 0% 

[HELP] Better description of some natives


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Depresie
Veteran Member
Join Date: Nov 2013
Old 04-05-2017 , 08:15   Re: [HELP] Better description of some natives
Reply With Quote #1

Any idea how you write this without a stock ?

PHP Code:
public function(index)
{
      new 
iWeaponEntity fm_find_ent_by_owner(entityszclassnameowner)
}

stock fm_find_ent_by_owner(entity, const classname[], owner)
{
    while ((
entity engfunc(EngFunc_FindEntityByStringentity"classname"classname)) && pev(entitypev_owner) != owner) { /* keep looping */ }
    return 
entity;

Something like

PHP Code:
public function(index)
{
    new 
iWeaponEntity ???
    ???
    ???
    

And could someone explain to me better how it works ?
__________________

Last edited by Depresie; 04-05-2017 at 08:17.
Depresie is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 04-05-2017 , 08:33   Re: [HELP] Better description of some natives
Reply With Quote #2

Quote:
Originally Posted by Depresie View Post
Any idea how you write this without a stock ?

PHP Code:
public function(index)
{
      new 
iWeaponEntity fm_find_ent_by_owner(entityszclassnameowner)
}

stock fm_find_ent_by_owner(entity, const classname[], owner)
{
    while ((
entity engfunc(EngFunc_FindEntityByStringentity"classname"classname)) && pev(entitypev_owner) != owner) { /* keep looping */ }
    return 
entity;

Something like

PHP Code:
public function(index)
{
    new 
iWeaponEntity ???
    ???
    ???
    

And could someone explain to me better how it works ?

No 💡
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-05-2017 , 09:20   Re: [HELP] Better description of some natives
Reply With Quote #3

Quote:
Originally Posted by Depresie View Post
Any idea how you write this without a stock ?

PHP Code:
public function(index)
{
      new 
iWeaponEntity fm_find_ent_by_owner(entityszclassnameowner)
}

stock fm_find_ent_by_owner(entity, const classname[], owner)
{
    while ((
entity engfunc(EngFunc_FindEntityByStringentity"classname"classname)) && pev(entitypev_owner) != owner) { /* keep looping */ }
    return 
entity;

Easy. Just move the code from the stock into your plugin. Done. OR, just use the stock (this is the better idea).
__________________

Last edited by fysiks; 04-05-2017 at 09:20.
fysiks is offline
Reply



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 17:54.


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