pls help with this
#1

pawn Код:
CMD:robbank(playerid,params[])
{
for (new i=0;i<MAX_PLAYERS;i++)
{
if (PlayerOrg[i] == PlayerOrg[playerid]/* && i != playerid*/) // Remove the identification when you'll not try alone anymore.
{
SendClientMessageToAll(COLOR_RED,"BREAKING NEWS: The San Andreas Bank has been robbed by a Mafia, ALARM ON!");
SendClientMessage(i,COLOR_RED,"Your family has started robbing the bank, Every 5 min(+5000)");
SetPlayerAttachedObject(i, 0, 1550, 1, -0.029999, -0.159999, -0.019999, -180.000000, 85.000000, -10.000000);
Robman[i][rob] = 1;}
}
return 1;
}
No errors, no warning
bug:- It shows like 100 messages in the chat with BREAKING NEWS:The SanAndreas Bank has been robbed by a Mafia, ALARM ON!
Reply
#2

pawn Код:
CMD:robbank(playerid,params[])
{
    for (new i=0;i<MAX_PLAYERS;i++)
    {
      if(IsPlayerConnected(i))
      {
        if (PlayerOrg[i] == PlayerOrg[playerid]/* && i != playerid*/) // Remove the identification when you'll not try alone anymore.
        {
            SendClientMessage(i,COLOR_RED,"Your family has started robbing the bank, Every 5 min(+5000)");
            SetPlayerAttachedObject(i, 0, 1550, 1, -0.029999, -0.159999, -0.019999, -180.000000, 85.000000, -10.000000);
            Robman[i][rob] = 1;
        }
      }
    }
    SendClientMessageToAll(COLOR_RED,"BREAKING NEWS: The San Andreas Bank has been robbed by a Mafia, ALARM ON!");
    return 1;
}
Reply
#3

bump srry.
Reply
#4

Try this and see if it still sends lots of messages

pawn Код:
CMD:robbank(playerid,params[])
{
    if (PlayerOrg[playerid])/* && i != playerid*/) // Remove the identification when you'll not try alone anymore.
    {
        SendClientMessageToAll(COLOR_RED,"BREAKING NEWS: The San Andreas Bank has been robbed by a Mafia, ALARM ON!");
        SendClientMessage(playerid,COLOR_RED,"Your family has started robbing the bank, Every 5 min(+5000)");
        SetPlayerAttachedObject(playerid, 0, 1550, 1, -0.029999, -0.159999, -0.019999, -180.000000, 85.000000, -10.000000);
        Robman[playerid][rob] = 1;
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)