2 Problems
#1

Hello,
Today I have two problems
First: I've created a timer in a FS, which ticks every second. But it doesn't get initiated...
pawn Код:
//OnFilterscriptInit
    SetTimer("Verlust", 1000, true);
    print("Timer wurde gestartet...");

public Verlust()
{
    print("Timer lдuft...");
    // Code
    return 1;
}
The problem is, as I said, that the timer doesn't start. I get the message "Timer wurde gestartet...", but not "Timer lдuft..."

Second:
pawn Код:
new msg[256], pName[MAX_PLAYER_NAME];
     if(strfind(text,"!")<3)
     {
     if (strlen(text)<3) return SendMessage(playerid, COLOR_WHITE, "Use #RED! [TEXT]#WHITE.", "Nutze #RED! [TEXT]#WHITE.");
     else
     {
         if(pInfo[playerid][muted]!=1 && ChatOff==false)
         {
            GetPlayerName(playerid, pName, sizeof(pName));
            if(gTeam[playerid]==0) format(msg, sizeof(msg), "#EUROPE[ID: %i] %s: #WHITE%s", playerid, pName, strdel(text, 0, 1));
            else if(gTeam[playerid]==1) format(msg, sizeof(msg), "#AMERICA[ID: %i] %s: #WHITE%s", playerid, pName, strdel(text, 0, 1));
            else if(gTeam[playerid]==2) format(msg, sizeof(msg), "#CHINA[ID: %i] %s: #WHITE%s", playerid, pName, strdel(text, 0, 1));
            else if(gTeam[playerid]==3) format(msg, sizeof(msg), "#INDIA[ID: %i] %s: #WHITE%s", playerid, pName, strdel(text, 0, 1));
            else if(gTeam[playerid]==4) format(msg, sizeof(msg), "#RUSSIA[ID: %i] %s: #WHITE%s", playerid, pName, strdel(text, 0, 1));
            else if(gTeam[playerid]==5) format(msg, sizeof(msg), "#DONATOR[ID: %i] %s: #WHITE%s", playerid, pName, strdel(text, 0, 1));
             return SendMessageToAll(COLOR_WHITE, msg, msg), 0;
         }
         else return SendMessage(playerid, COLOR_WHITE, "Either you're muted or the global chat has been turned off by an administrator.", "Entweder bist du gemutet oder der Globale Chat wurde von einem Administrator deaktiviert."), 0;
     }
    }
That's a global chat which is used with ! (not with /o or the like). But it creates such bugs, which logicaly aren't possible to be created... For example I type in !lol - The chat says "[ID: 0] Padarom: lleutnant" - Every following try (no matter if I do use ! or not) will return the normal message, but not the formated.

Hope you can help me.

Regards
Padarom
Reply


Messages In This Thread
2 Problems - by Padarom - 04.01.2012, 10:59

Forum Jump:


Users browsing this thread: 1 Guest(s)