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

Questin for enrtty


Post New Thread Reply   
 
Thread Tools Display Modes
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 06-29-2019 , 15:17   Re: Questin for enrtty
Reply With Quote #11

Quote:
Originally Posted by PawNod View Post
@HamletEagle when ı use FM_EmitSound if ı change weapon it is using
Check whether the sound is equal to the use sound.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
PawNod
Member
Join Date: Jun 2019
Location: Turkey
Old 06-29-2019 , 15:38   Re: Questin for enrtty
Reply With Quote #12

What is wrog ?
PHP Code:
public fm_cmdstart(id,uc_handle,seed) {
    if(!
is_user_alive(id)) return
    new 
buttons get_uc(uc_handle,UC_Buttons)
    if(
buttons  IN_USE) {
        
client_print(0,print_chat,"No Mesafe Calisiyor.")
        new 
PlayerOrigin[3];
        new 
EntityOrigin[3];
        new 
players[32], inum;
        static 
Uid;
        
get_players(playersinum"a")
        for(new 
iinumi++) {
            
Uid players[i];
            
get_user_origin(Uid,PlayerOrigin)
        }
        
get_user_origin(get_ent_id,EntityOrigin)
        new 
mesafe get_distance(EntityOrigin,PlayerOrigin)
        if(
mesafe 80) {
          
client_print(0,print_chat,"Calisiyor.")
        }
    }

PawNod is offline
PawNod
Member
Join Date: Jun 2019
Location: Turkey
Old 06-29-2019 , 15:52   Re: Questin for enrtty
Reply With Quote #13

Game log say " Invaild player id 124 "
I guess origin is wrong . What can I do ?
PawNod is offline
thEsp
BANNED
Join Date: Aug 2017
Old 06-29-2019 , 16:00   Re: Questin for enrtty
Reply With Quote #14

As I said, the "author" copied these and posted them here. Origin is not wrong, it's very badly coded.
And you need to check if each (i) player is really using the button. Check if user is aiming at the entity.
thEsp is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 06-29-2019 , 16:11   Re: Questin for enrtty
Reply With Quote #15

CmdStart can work too. If the user is pressing E(IN_USE) and he is close to the entity(which you check with get_distance_f and knowing the entity index) then you can assume he's using the entity.
But it's a bad way, use FM_EmitSound and check for the right sound(I don't remember exactly the name, search, this was already done several times).
__________________

Last edited by HamletEagle; 06-29-2019 at 16:13.
HamletEagle is offline
PawNod
Member
Join Date: Jun 2019
Location: Turkey
Old 06-29-2019 , 16:22   Re: Questin for enrtty
Reply With Quote #16

HamletEagle I understand but it is not working.

Last edited by PawNod; 06-29-2019 at 16:22.
PawNod is offline
PawNod
Member
Join Date: Jun 2019
Location: Turkey
Old 06-29-2019 , 16:32   Re: Questin for enrtty
Reply With Quote #17

get_user_origin is wrong for entity what can ı do for entity
PawNod is offline
thEsp
BANNED
Join Date: Aug 2017
Old 06-29-2019 , 16:41   Re: Questin for enrtty
Reply With Quote #18

Code:
new Float:f_Origin[3] pev(ent,pev_origin,f_Origin)

Last edited by thEsp; 06-29-2019 at 16:57. Reason: my bad
thEsp is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 06-29-2019 , 16:43   Re: Questin for enrtty
Reply With Quote #19

Dont bump your thread edit the previous post

Don't declare variables in cmdstart using new use static.

And theEsp you need only 3 parameters when you are getting user origin through fakemeta. Player id , constant pev_origin , float vector
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 06-29-2019 at 16:48.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
PawNod
Member
Join Date: Jun 2019
Location: Turkey
Old 06-29-2019 , 16:57   Re: Questin for enrtty
Reply With Quote #20

@Natsheh I'am sorry. I will try it
PawNod 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 19:25.


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