AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Buildmode Help. (https://forums.alliedmods.net/showthread.php?t=170495)

rainin 10-25-2011 14:33

Buildmode Help.
 
Got it working. Thnx Evaldas :)

Evaldas.Grigas 10-25-2011 14:45

Re: Buildmode Help.
 
Why you use g_buildmode[i] = false... and then g_buildmode[id] = true?

rainin 10-25-2011 14:49

Re: Buildmode Help.
 
Quote:

Originally Posted by Evaldas.Grigas (Post 1583119)
Why you use g_buildmode[i] = false... and then g_buildmode[id] = true?

Oh sry, Didn't saw it there. But is that the problem?

Evaldas.Grigas 10-25-2011 14:54

Re: Buildmode Help.
 
I don't know. I don't have whole code to check it. But it could be the problem.

BTW. What's the problem it doesn't give it at all or it gives it to all playes?

rainin 10-25-2011 15:01

Re: Buildmode Help.
 
The problem was that it only gave buildmode, who wrote /buildmode And thnxs that was the problem :) -.- But Now i Have another problem.

Code:

public showBuildmode(id)
{
        new col[3];
        new szMenu[256];
        new szBuildmode[6];
        col = (get_user_flags(id) & BM_OMANIK ? "\w" : "\d");
        for (new i = 1; i <= 32; ++i)
        {
        szBuildmode = (g_buildmode[i] ? "\yOn" : "\rOff");
        }
       
        if(get_user_flags(id) & BM_OMANIK) {
        //format the main menu
        format(szMenu, 256, gszBuildmode, col, szBuildmode);
       
        //show the main menu to the player
        show_menu(id, gKeysBuildmode, szMenu, -1, "bmBuildmode");
}       
        else
{
        client_printc(id, "^x03%s^x04 Buildmode^x01 Can Be^x04 Enabled^x01 Only By ^x04Owner!", gszPrefix);
}
        return PLUGIN_HANDLED;
}

How can i do so it would show me if the buildmode is on or off

Evaldas.Grigas 10-25-2011 15:04

Re: Buildmode Help.
 
Well... Try this:
PHP Code:

if(g_buildmode == fasle)
{
client_print(idprint_center"Buildmode is off")
}
if(
g_buildmode == true)
client_print(idprint_center"Buildmode is on"

P.S. Were it should show you? Like a hud message? Or ptiny in the center or chat?

rainin 10-25-2011 15:07

Re: Buildmode Help.
 
Quote:

Originally Posted by Evaldas.Grigas (Post 1583130)
Well... Try this:
PHP Code:

if(g_buildmode == fasle)
{
client_print(idprint_center"Buildmode is off")
}
if(
g_buildmode == true)
client_print(idprint_center"Buildmode is on"


I dont mean like that...

Code:

{
        szBuildmode = (g_buildmode[i] ? "\yOn" : "\rOff");
        }

So it would show like this.

Evaldas.Grigas 10-25-2011 15:09

Re: Buildmode Help.
 
I don't know :D. I am not very experienced :D

rainin 10-25-2011 15:09

Re: Buildmode Help.
 
Quote:

Originally Posted by Evaldas.Grigas (Post 1583133)
I don't know :D. I am not very experienced :D

:) Okey. Can someone help me with this little thing?

Xellath 10-25-2011 16:25

Re: Buildmode Help.
 
Code:
formatex( szBuildmode, charsmax( szBuildmode ), ( g_buildmode[ id ] ? "\yOn" : "\rOff" ) );


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

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