for(new i;i<MAX_PLAYERS;i++){
#1

Hello. I am making a world event command, and I am making it so a bridge will fall appart, and LSFMD and News Faction will be notified. This is part of my command:

pawn Код:
for(new i;i<MAX_PLAYERS;i++)
    {
        if(strval(params) == 1)
        {
            /* Broken Bridge */
            RemoveBuildingForPlayer(i, 3991, 1608.1953, -1721.8047, 26.0000, 0.25);
            RemoveBuildingForPlayer(i, 4043, 1608.1953, -1721.8047, 26.0000, 0.25);
However, it only removes the bridge for player id 0.

What's wrong?
Reply
#2

Don't know, show more. Probably some misplaced return.
Reply
#3

Are you maybe returning inside a loop?
Reply
#4

Yes, I used return. Removed it and now it works fine. Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)