Raised This Month: $ Target: $400
 0% 

Solved Take Player +attack


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
XSlayer
Member
Join Date: Dec 2021
Old 07-16-2022 , 21:09   Re: Take Player +attack
Reply With Quote #3

Quote:
Originally Posted by damage220 View Post
Hi. There are IN_ATTACK and IN_ATTACK2 flags.
PHP Code:
public client_PreThink(cid)
{
    new 
btn;

    if(!
is_user_alive(cid))
        return;
    
btn get_user_button(cid);
    if(!(
btn IN_ATTACK))
        return;
    
/* do some things */


PreThink is more effective than cmd start? i mean for the cpu

PHP Code:
public @ClientCommand_InstantClientHandle )
{
      if(!
is_user_aliveClient ))
      {
           return 
1;
      }
      else
      {
         if(!
__int_Transformation[Client][5]) // Cant make an instant transformation
         

                 return 
1;
         }
         else
         {        
            if(
__int_Transformation[Client][0]) // Is in a transformation
            
{
                    return 
1;
            }
            else
            {            
               if(
get_user_weaponClient ) != 1// Not holding the correct weapon
               
{
                         return 
1;
               }   
               else
               { 
                      if(!
get_pdata_intClient198 )) // Not blocking
                      
{
                               return 
1;
                      }
                      else
                      {
                               static 
ControlControl get_uc(HandleUC_Buttons);

                               if((
Control == IN_ATTACK))
                               {
                                      
fxChargeInstantClient );
                               }
                      }
                       
               }
            }
         }
      }
      return 
0;

im doing this in CMD_Start

Last edited by XSlayer; 07-16-2022 at 21:12.
XSlayer is offline
 



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 15:40.


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