AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Fakemeta reapi hk. (https://forums.alliedmods.net/showthread.php?t=334799)

taykor19 10-14-2021 15:44

Fakemeta reapi hk.
 
How can I write the plugin I gave below with reapi, can you help me?

PHP Code:

#include <amxmodx>
#include <fakemeta>

new last_stand[33],Float:duck_start_time[33],Float:last_origin[33][3]

public 
plugin_init() {
    
register_forward(FM_CmdStart"pfw_CmdStart"1)
}
public 
pfw_CmdStart(idpUCseed)
{
    new 
iButtons get_uc(pUCUC_Buttons)
    if(
iButtons IN_DUCK)
    {
        if(
last_stand[id])
        {
            
pev(id,pev_origin,last_origin[id])
            
            
duck_start_time[id] = get_gametime()    
            
last_stand[id] = false;
        }
    }
    else
    {
        if(!
last_stand[id])
        {
            new 
Float:fGameTime get_gametime()
            if((
fGameTime-duck_start_time[id])<0.02)
            {
                
engfunc(EngFunc_SetOriginidlast_origin[id])
                
set_pev(idpev_bInDuckfalse);
            }
        }
        
last_stand[id] = true;
    }




All times are GMT -4. The time now is 11:31.

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