Jump to content

Question

Posted (edited)

Poate sa ma ajute cineva?

Problema: imi scrie in chat de 2 ori...

Poza // In game: "https://imgur.com/a/jELYlVb"

COD: 

public OnPlayerText(playerid, text[])
{
    if(IsPlayerLogged(playerid))
    {
        if(PlayerInfo[playerid][pMute] > gettime())
        
        {
            SendFormatMessage(playerid, 0xe88d87FF, "You are muted! You can type again in %d %s.", ((PlayerInfo[playerid][pMute] - gettime()) > 60) ? ((PlayerInfo[playerid][pMute] - gettime()) / 60) : (PlayerInfo[playerid][pMute] - gettime()), ((PlayerInfo[playerid][pMute] - gettime()) > 60) ? ("minutes") : ("seconds"));
            return false;
        }
        
        SendNearbyMessage(playerid, COLOR_WHITE, 25.0, "%s: %s", GetPlayerNameEx(playerid), text);
        SetPlayerChatBubble(playerid, text, COLOR_WHITE, 25.0, 5000);

        gQuery[0] = (EOS);
        mysql_format(SQL, gQuery, sizeof(gQuery), "INSERT INTO `server_chat_log` (Name, Text) VALUES ('%s', '%s')", GetPlayerNameEx(playerid), text);
        mysql_pquery(SQL, gQuery, "", "");
    }
    return 1;
}

Edited by NuamNume

5 answers to this question

Recommended Posts

  • 0
Posted
1 oră în urmă, [El.Capo] a spus:

in loc de return 1; pune return false; sau return 0;

Salut 😅

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.