Screen stuck
#1

Something happen with this code. Previously was all good, but now when I type /sumo screen stuck for ~2 seconds and it flood this line:
Код:
SendClientMessage(playerid, 0xDEEE20FF, "Norėdami iљeiti raљykite /isumo.");
Code:

Код:
        COMMAND:sumo( playerid, params[ ] )
{
        for(new i; i < MAX_PLAYERS; i++)
        {
        if(Sumoprasidejes[i]) return SendClientMessage(playerid, 0xDEEE20FF, "Registracija uћdaryta!");
        if(DM[playerid]) return SendClientMessage(playerid, 0xDEEE20FF, "Jūs DM zonoje!");
        if(TMDM[playerid]) return SendClientMessage(playerid, 0xDEEE20FF, "Jūs Team DM zonoje!");
        SetPlayerPos(playerid,1572.8695,-1238.7939,277);
        SendClientMessage(playerid, 0xDEEE20FF, "Norėdami iљeiti raљykite /isumo.");
        Sumo[playerid] = true;
        sumo[playerid] = Create3DTextLabel("Uћsiregistravęs", 0xFF6347AA, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(sumo[playerid], playerid, 0.0, 0.0, 0.6);
        }
        return 1;
}
Reply
#2

You're running all of your code inside of a loop that is executed 500 times. Of course the server is going to freeze, and OF COURSE the message is going to spam- it's being sent 500 times afterall!
Reply
#3

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
You're running all of your code inside of a loop that is executed 500 times. Of course the server is going to freeze, and OF COURSE the message is going to spam- it's being sent 500 times afterall!
How to fix that?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)