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

Solved How do I get a error in my plug-in?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
2389736818
Member
Join Date: Jul 2014
Location: China
Old 04-30-2018 , 07:01   How do I get a error in my plug-in?
Reply With Quote #1

sp code
PHP Code:
#include <smrpg>
#include <cstrike>

#pragma newdecls required

char g_szClantag[MAXPLAYERS+1][32];

public 
Plugin myinfo 
{
    
name "SM RPG Level Clantag",
    
author "2389736818",
    
description "",
    
version "1.0",
    
url "http://www.sourcemod.net/"
};

public 
void OnAllPluginsLoaded()
{
    if(!
LibraryExists("smrpg"))
        
SetFailState("SM RPG not found. Plugin won't work.");
    
    
CreateTimer(1.0Timer_SetTag_TIMER_REPEAT);
}

public 
void OnLibraryRemoved(const char[] name)
{
    if(
StrEqual(name"smrpg"))
        
SetFailState("SM RPG not found. Plugin won't work.");
}

public 
void OnClientConnected(int client)
{
    
strcopy(g_szClantag[client], 32"Loading...");
}

public 
Action SMRPG_OnPlayerLoaded(int client)
{
    
SMRPG_GetClientLevel(clientGetClientLevelCallback);
}

public 
int GetClientLevelCallback(int clientint Levelany data)
{
    if(
Level == 0)
        
strcopy(g_szClantag[client], 32"No-Level");
    else
        
Format(g_szClantag[client], 32"Level-%d"Level);
}


public 
Action Timer_SetTag(Handle timer)
{
    for(
int client 1client <= MaxClients; ++client)
    {
        if(!
IsClientInGame(client))
            continue;
        
        if(!
GetClientTeam(client))
            continue;
        
        
CS_SetClientClanTag(clientg_szClantag[client]);
    }

Attached Thumbnails
Click image for larger version

Name:	1804301900_1.png
Views:	56
Size:	3.4 KB
ID:	169553  
__________________

Last edited by 2389736818; 04-30-2018 at 09:18.
2389736818 is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 04-30-2018 , 07:41   Re: How do I get a error in my plug-in?
Reply With Quote #2

SMRPG_GetClientLevel(client, GetClientLevelCallback);

should be

SMRPG_GetClientLevel(client);
__________________
8guawong is offline
ThatKidWhoGames
Veteran Member
Join Date: Jun 2013
Location: IsValidClient()
Old 04-30-2018 , 08:57   Re: How do I get a error in my plug-in?
Reply With Quote #3

You should probably post this in Scripting (this is the plugin request section).
ThatKidWhoGames 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 22:51.


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