Jump to content

Question

Posted

Buna ziua sa-mp.ro

am o problema cu chatul

Intra un jucator pe server si are admin lv 0

cand vrea el sa scrie ceva nu ii apare nik la chat

Intru eu pe server(am nivel maxim) si cand scriu ceva imi apare

prin urmare

jucatorii nu pot tasta nimik in chat

codul de la OnPlayerText

[pawn]

// Chat

//==============================================================================

#if ADM_InMSG == true

if (AccInfo[playerid][Hide] == 0)

{

if(AccInfo[playerid][Level] > 1)

{

new str3[256];

format(str3, 256, "{FF0000}(Admin): %s", text);

for(new gz=0;gz<200;gz++)

if(IsPlayerConnected(gz))

SendPlayerMessageToPlayer(gz, playerid, str3);

else SendPlayerMessageToPlayer(gz, playerid, text);

}

return 0;

}

#endif

[/pawn]

M-am lasat de comunitatea sa-mp.ro

9 answers to this question

Recommended Posts

Posted

      if ( AccInfo [ playerid ] [ Level ] == 0 )

    {

        new

            string [      256      ]

            pName  [ MAX_PLAYER_NAME ]

        ;

        GetPlayerName ( playerid , pName , sizeof ( pName ) ) ;

        format ( string , 256 , "%s: %s" , pName , text ) ;

        SCMTA ( 0xFFFFFFFF , string ) ;

    }

Posted

lam adaugat si numi mere

trebuia sal sub cod correct?

[pawn]

E:\svr\filterscripts\LuxAdmin.pwn(581) : warning 217: loose indentation

E:\svr\filterscripts\LuxAdmin.pwn(1131) : warning 211: possibly unintended assignment

E:\svr\filterscripts\LuxAdmin.pwn(1139) : error 001: expected token: ";", but found "-identifier-"

E:\svr\filterscripts\LuxAdmin.pwn(1139) : warning 217: loose indentation

E:\svr\filterscripts\LuxAdmin.pwn(1139) : error 028: invalid subscript (not an array or too many subscripts): "pName"

E:\svr\filterscripts\LuxAdmin.pwn(1139) : warning 215: expression has no effect

E:\svr\filterscripts\LuxAdmin.pwn(1139) : error 001: expected token: ";", but found "]"

E:\svr\filterscripts\LuxAdmin.pwn(1139) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

4 Errors.

[/pawn]

PS:am luxadmin

se vedea din model

M-am lasat de comunitatea sa-mp.ro

Posted

public OnPlayerText ( playerid , text [ ] )

{

      if ( AccInfo [ playerid ] [ Level ] == 0 )

    {

        new

            string [      256      ]

            pName  [ MAX_PLAYER_NAME ]

        ;

        GetPlayerName ( playerid , pName , sizeof ( pName ) ) ;

        format ( string , 256 , "%s: %s" , pName , text ) ;

        SCMTA ( 0xFFFFFFFF , string ) ;

    }

    return ( 0 ) ;

}

Posted

Mai de la tara...dar nu apare numele ;))

[pawn]#if ADM_InMSG == true

if (AccInfo[playerid][Hide] == 0)

{

if(AccInfo[playerid][Level] < 1)

{

new str3[256];

format(str3, 256, "(Player): %s", text);

for(new gz=0;gz<200;gz++)

if(IsPlayerConnected(gz))

SendPlayerMessageToPlayer(gz, playerid, str3);

else SendPlayerMessageToPlayer(gz, playerid, text);

}

return 0;

}

#endif[/pawn]

[glow=blue,2,300]SAMP.[glow=yellow,2,300]RSP-GAME[glow=red,2,300].NET[/glow][/glow][/glow]

Posted

liniile

[pawn]//==============================================================================

// Send Admin in front of name

//==============================================================================

#if ADM_InMSG == true

if (AccInfo[playerid][Hide] == 0)

{

if(AccInfo[playerid][Level] > 1)

{

new str3[256];

format(str3, 256, "{FF0000}(Admin): %s", text);

for(new gz=0;gz<200;gz++)

if(IsPlayerConnected(gz))

SendPlayerMessageToPlayer(gz, playerid, str3);

else SendPlayerMessageToPlayer(gz, playerid, text);

}

return 0;

}

#endif

{

      if ( AccInfo [ playerid ] [ Level ] == 0 )

    {

   

        new

            string [      256      ]

            pName  [ MAX_PLAYER_NAME ]

        ;

        GetPlayerName ( playerid , pName , sizeof ( pName ) ) ;

        format ( string , 256 , "%s: %s" , pName , text ) ;

        SCMTA ( 0xFFFFFFFF , string ) ;

    }

    return ( 0 ) ;

}[/pawn]

M-am lasat de comunitatea sa-mp.ro

Posted

solutia lu darky ma bubuie de erori

solutia lui staff nu mi se vede chatul cand scrie adminu

Na..

[pawn]// Chat

//==============================================================================

#if ADM_InMSG == true

if (AccInfo[playerid][Hide] == 0)

{

if(AccInfo[playerid][Level] > 1)

{

new str3[256];

format(str3, 256, "{FF0000}(Admin): %s", text);

for(new gz=0;gz<200;gz++)

if(IsPlayerConnected(gz))

SendPlayerMessageToPlayer(gz, playerid, str3);

else SendPlayerMessageToPlayer(gz, playerid, text);

}

        else if(AccInfo[playerid][Level] < 1)

        {

        new str3[256];

format(str3, 256, "{FFFFFF}(PLAYER): %s", text);

for(new gz=0;gz<200;gz++)

if(IsPlayerConnected(gz))

SendPlayerMessageToPlayer(gz, playerid, str3);

else SendPlayerMessageToPlayer(gz, playerid, text);

          }

return 0;

}

#endif[/pawn]

[glow=blue,2,300]SAMP.[glow=yellow,2,300]RSP-GAME[glow=red,2,300].NET[/glow][/glow][/glow]

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.