This msg keeps repeating
#3

Quote:
Originally Posted by MP2
Посмотреть сообщение
Show the whole code, including the timer.
pawn Код:
public pRobTimer(playerid)
{
    pRobCount[playerid]--;
    new rbgt[128];
    format(rbgt, sizeof(rbgt), "Robbery ~g~in progress.~r~Do NOT leave the checkpoint.~y~Time left: ~g~%i", pRobCount[playerid]);
    GameTextForPlayer(playerid, rbgt, 1000, 5);
    for(new i=0;i<MAX_PLAYERS;i++)
    {
    if(!IsPlayerConnected(i))continue;
    new current_zone;
    current_zone = player_zone[i];
    if(gTeam[i] == TEAM_COP)
    {
    new copmsg[170];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(copmsg, sizeof(copmsg), "- WARNING ALL COPS: Robbery in progress by %s (%d) - Location: %s",name,playerid,zones[current_zone][zone_name]);
    SendClientMessage(i, COLOR_BLUE, copmsg);
    }
    }
    if(pRobCount[playerid] == 0)
    {
        KillTimer(pRobTimerID[playerid]);
        new plwl = GetPlayerWantedLevel(playerid);
        plwl = GetPlayerWantedLevel(playerid);
        SetPlayerWantedLevel(playerid,plwl +2);
        new robmoney = 10500 + random(50000);
        GivePlayerMoney(playerid,robmoney);
        new string2[135];
        format(string2, sizeof(string2), "- SUCCESS ROBBERY - Wanted Level %d - Robbed %i$",plwl,robmoney);
        SendClientMessage(playerid,red,string2);
        GameTextForPlayer(playerid, "Robbery ~r~COMPLETE.", 3000, 5);
        new file[128];
        new pname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pname, sizeof(pname));
        format(file, sizeof(file), SERVER_USER_FILE, pname);
        TotalRobberies += PlayerInfo[playerid][pRobberies];
        PlayerInfo[playerid][pRobberies] = dini_Int(file, "Robberies");
        SetPlayerScore(playerid, GetPlayerScore(playerid) + 1);
        new string3[135];
        new current_zone;
        current_zone = player_zone[playerid];
        new name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));
        format(string3, sizeof(string3), "- ROBBERY - %s (%d) has robbed %i$ from %s",name,playerid,robmoney,zones[current_zone][zone_name]);
        SendClientMessageToAll(COLOR_WHITE,string3);
    }
}
Reply


Messages In This Thread
This msg keeps repeating - by Face9000 - 28.01.2012, 21:52
Re: This msg keeps repeating - by MP2 - 28.01.2012, 22:21
Re: This msg keeps repeating - by Face9000 - 28.01.2012, 22:52
Re: This msg keeps repeating - by Babul - 29.01.2012, 01:40

Forum Jump:


Users browsing this thread: 1 Guest(s)