Raised This Month: $32 Target: $400
 8% 

How get String (SDKCall)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Vit_amin
Senior Member
Join Date: Dec 2015
Location: Russian Federation
Old 01-07-2016 , 11:23   How get String (SDKCall)
Reply With Quote #1

How right get String in this code ?
Game Left 4 Dead
Code:
120 CTerrorGameRules::GetChatPrefix(bool,CBasePlayer *)
PHP Code:
#include <sdktools>
#pragma newdecls required;

Handle h_GameConfigh_RestartRound

public void OnPluginStart()
{
    
HookEvent("round_start"Event_RoundStartEventHookMode_PostNoCopy);
    
h_GameConfig LoadGameConfigFile("test");
    if (
h_GameConfig)
    {
        
StartPrepSDKCall(SDKCall_GameRules);
        
PrepSDKCall_SetFromConf(h_GameConfigSDKConf_Virtual"GetChatPrefix");
        
PrepSDKCall_AddParameter(SDKType_BoolSDKPass_Plain);
        
PrepSDKCall_AddParameter(SDKType_CBasePlayerSDKPass_Pointer);
        
PrepSDKCall_SetReturnInfo(SDKType_StringSDKPass_Plain);
        
h_RestartRound EndPrepSDKCall();
        if (!
h_RestartRound)
        {
            
LogError("GetChatPrefix Offset Broken");
        }
    }
    
delete h_GameConfig;
}

public 
void Event_RoundStart(Event event, const char[] namebool dontBroadcast)
{
    
CreateTimer(2.0TimerTest);
}

public 
Action TimerTest(Handle timer)
{
    
char gggg[64];
    for (
int i 1<= 32i++)
    {
        if (
IsClientInGame(i) && !IsFakeClient(i))
        {
            
// bool bTeamOnly, CBasePlayer *pPlayer 
            
SDKCall(h_RestartRoundfalseigggg32);
        }
    }
    
PrintToChatAll("Prefix %s"gggg); 


Last edited by Vit_amin; 01-07-2016 at 11:24.
Vit_amin is offline
Reply


Thread Tools
Display Modes

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 18:57.


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