AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Extensions (https://forums.alliedmods.net/forumdisplay.php?f=134)
-   -   [CS:GO] PTaH - V1.0.8 (https://forums.alliedmods.net/showthread.php?t=289289)

nikuafreak 11-22-2017 04:36

Re: [CS:GO] PTaH - V1.0.8
 
The download plugin link doesn't work and also the website https://ptah.zizt.ru/

hengen 11-29-2017 09:31

Re: [CS:GO] PTaH - V1.0.8
 
Plugin failed to compile! Please try contacting the author.

Dr.Mohammad 12-08-2017 13:01

Re: [CS:GO] PTaH - V1.0.8
 
hi guys

I Have Problem In Compile This Plugin:
PHP Code:

#pragma semicolon 1 
#include <PTaH> 

public Plugin myinfo =
{
    
name "Cleaner",
    
author "Phoenix (˙·٠●Феникс●٠·˙)",
    
version "1.0.0",
    
url "https://zizt.ru/ | http://hlmod.ru | https://forums.alliedmods.net/"
};

char sPath[128];
char sFilter[32][256];
int sFilter_;

public 
void OnPluginStart()  
{
    
BuildPath(Path_SMsPathsizeof(sPath), "configs/cleaner.cfg");
    if(!
FileExists(sPath)) SetFailState("[Cleaner] File cleaner.cfg not found");
    
PTaH(PTaH_ServerConsolePrintHookServerConsolePrint); 
}

public 
void OnMapStart() 
{
    
sFilter_ 0;
    
File bdc OpenFile(sPath"r");
    while (!
bdc.EndOfFile())
    {
        
bdc.ReadLine(sFilter[sFilter_], sizeof(sFilter[]));
        
sFilter_++;
    }
    
delete bdc;
}

public 
Action ServerConsolePrint(const char[] sMessage
{
    for(
int isFilter_i++) if (StrContains(sMessagesFilter[i]) != -1) return Plugin_Handled
    return 
Plugin_Continue


error:
http://uupload.ir/files/gpv5_un1111titled.png

please help me.thank you

komashchenko 12-09-2017 03:59

Re: [CS:GO] PTaH - V1.0.8
 
Quote:

Originally Posted by Dr.Mohammad (Post 2565113)
hi guys

I Have Problem In Compile This Plugin:
PHP Code:

#pragma semicolon 1 
#include <PTaH> 

public Plugin myinfo =
{
    
name "Cleaner",
    
author "Phoenix (˙·٠●Феникс●٠·˙)",
    
version "1.0.0",
    
url "https://zizt.ru/ | http://hlmod.ru | https://forums.alliedmods.net/"
};

char sPath[128];
char sFilter[32][256];
int sFilter_;

public 
void OnPluginStart()  
{
    
BuildPath(Path_SMsPathsizeof(sPath), "configs/cleaner.cfg");
    if(!
FileExists(sPath)) SetFailState("[Cleaner] File cleaner.cfg not found");
    
PTaH(PTaH_ServerConsolePrintHookServerConsolePrint); 
}

public 
void OnMapStart() 
{
    
sFilter_ 0;
    
File bdc OpenFile(sPath"r");
    while (!
bdc.EndOfFile())
    {
        
bdc.ReadLine(sFilter[sFilter_], sizeof(sFilter[]));
        
sFilter_++;
    }
    
delete bdc;
}

public 
Action ServerConsolePrint(const char[] sMessage
{
    for(
int isFilter_i++) if (StrContains(sMessagesFilter[i]) != -1) return Plugin_Handled
    return 
Plugin_Continue


error:
http://uupload.ir/files/gpv5_un1111titled.png

please help me.thank you

Spoiler

Dr.Mohammad 12-09-2017 11:56

Re: [CS:GO] PTaH - V1.0.8
 
Quote:

Originally Posted by komashchenko (Post 2565197)
Spoiler

thank you friend :X

Byte 12-21-2017 12:32

Re: [CS:GO] PTaH - V1.0.8
 
Hey I was wondering if you had any idea on how to fix this issue.
We discussed it a little on steam.
This is important for servers that block some weapons in some rounds etc.

Plugin 1 using PTaH:
PHP Code:

public void OnPluginStart()
{
  
PTaH(PTaH_GiveNamedItemPreHookGiveNamedItemPre);
  
PTaH(PTaH_WeaponCanUseHookWeaponCanUse);
}

public 
void GiveNamedItemPre(int clientchar classname[64], CEconItemView &itembool &ignoredCEconItemView)
{
  
//Do anything here to ak47 here or do nothing
  
return Plugin_Changed;
}

public 
bool WeaponCanUse(int clientint entbool canuse)
{
  
//check if ent is the ak47 here etc
  
return true;


Other plugins
PHP Code:

public void OnClientPutInServer(int client)
{
  
SDKHook(clientSDKHook_WeaponCanUseHook_BlockPickup);
}


//Block AK47
public Action Hook_BlockPickup(int clientint weapon)
{
  
char weaponClass[64];
  
GetEntityClassname(weaponweaponClasssizeof(weaponClass));
  
  if (
StrEqual(weaponClass"weapon_ak47"))
    return 
Plugin_Handled;

  return 
Plugin_Continue;


In this case, the AK47 will always be equipped even if other plugins use SDKHooks with SDKHook_WeaponCanUse to block it. A lot of plugins use this so it would be good if there was a solution for this.

Why does returning Plugin_Changed in GiveNamedItemPre without changing anything cause the weapon to not be able to be picked up? I'm sure this can be fixed so the weapon can still be picked up by default without needing to use the PTaH weaponcanuse. That way you can just use SDKHooks only for WeaponCanUse.

What does removeIfNotCarried do?
https://github.com/komashchenko/PTaH...wards.cpp#L374

Maybe using MRES_OVERRIDE here:
https://github.com/komashchenko/PTaH...wards.cpp#L398

I did some testing, will try some more stuff later.
Let me know if you have any ideas.

Dr.Mohammad 12-28-2017 07:22

Re: [CS:GO] PTaH - V1.0.8
 
hi guys!

i used this plugin for console cleaner with cleaner.cfg !!

but not work!! console cleaner dont work in the my servers !!

Does the code work properly:
PHP Code:

PTaH(PTaH_ServerConsolePrintHookServerConsolePrint); 

plugin:
PHP Code:

#pragma semicolon 1  
#include <PTaH>  

public Plugin myinfo 

    
name "Cleaner"
    
author "Phoenix (˙·٠●Феникс●٠·˙)"
    
version "1.0.0"
    
url "https://zizt.ru/ | http://hlmod.ru | https://forums.alliedmods.net/" 
}; 

char sPath[128]; 
char sFilter[32][256]; 
int sFilter_

public 
void OnPluginStart()   

    
BuildPath(Path_SMsPathsizeof(sPath), "configs/cleaner.cfg"); 
    if(!
FileExists(sPath)) SetFailState("[Cleaner] File cleaner.cfg not found"); 
    
PTaH(PTaH_ServerConsolePrintHookServerConsolePrint);  


public 
void OnMapStart()  

    
sFilter_ 0
    
File bdc OpenFile(sPath"r"); 
    while (!
bdc.EndOfFile()) 
    { 
        
bdc.ReadLine(sFilter[sFilter_], sizeof(sFilter[])); 
        
sFilter_++; 
    } 
    
delete bdc


public 
Action ServerConsolePrint(const char[] sMessageLoggingSeverity severity)  

    for(
int isFilter_i++) if (StrContains(sMessagesFilter[i]) != -1) return Plugin_Handled;  
    return 
Plugin_Continue;  



wolvez04 12-30-2017 00:54

Re: [CS:GO] PTaH - V1.0.8
 
The gamedata is different in the first post which says 1.8 compared to the github 1.8 version found here https://ptah.zizt.ru/

Dr.Mohammad 12-30-2017 02:14

Re: [CS:GO] PTaH - V1.0.8
 
Quote:

Originally Posted by wolvez04 (Post 2568810)
The gamedata is different in the first post which says 1.8 compared to the github 1.8 version found here https://ptah.zizt.ru/

i used this version .

CowGod 01-01-2018 04:20

Re: [CS:GO] PTaH - V1.0.8
 
Any idea why the extension may be unloading randomly?


All times are GMT -4. The time now is 00:14.

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