Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi1v1_GetRoundTypeDisplayName doesn't work. #230

Open
SurajBhari opened this issue May 28, 2019 · 3 comments
Open

Multi1v1_GetRoundTypeDisplayName doesn't work. #230

SurajBhari opened this issue May 28, 2019 · 3 comments

Comments

@SurajBhari
Copy link

SurajBhari commented May 28, 2019

#include <sourcemod>
#include <multi1v1>
#include <cstrike>

public void OnPluginStart()
{
	HookEvent("round_start", Event_OnRoundStart);
}


public void Event_OnRoundStart(Handle event, const char[] name, bool dontBroadcast)
{
    for (new i = 1; i <= MaxClients; i++)
    {
        if(IsClientInGame(i) && !IsFakeClient(i))
        {
            PrintCenterText(i, " Hello ;-; " "Multi1v1_GetCurrentRoundType();
        }
    }
}

so i am not so good at coding and all , maybe cuz i am too young for it '='
so i just wanted a plugin which just tell which round is being played in their arena
but its not working out can you just tell me whats wrong
or maybe merge it

@splewis
Copy link
Owner

splewis commented May 28, 2019

You probably want something like:

#include <sourcemod>
#include <multi1v1>
#include <cstrike>

public void Multi1v1_AfterPlayerSetup(int client) {
    int arena = Multi1v1_GetArenaNumber(client);
    if (arena > 0) {
        int roundType = Multi1v1_GetCurrentRoundType(arena);
        char roundTypeName[64];
        Multi1v1_GetRoundTypeDisplayName(roundType, roundTypeName, sizeof(roundTypeName));
        PrintCenterText(client, "Round type: %s", roundType);         
    } 
}

@SurajBhari
Copy link
Author

It doesnt seem to work , no error in logs
it just prints

Round type:

should be a problem with native itself

@splewis
Copy link
Owner

splewis commented Jun 3, 2019

There could be a bug with it - but I don't see anything from quickly looking at the code.

@SurajBhari SurajBhari changed the title just wanted some help :) Multi1v1_GetRoundTypeDisplayName doesn't work. Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants