[AYUDA]Con Comando De Respawn
#4

Intentalo asi:
pawn Код:
if(strcmp(cmd, "/respawn", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            GetPlayerName(playerid, sendername, sizeof(sendername));
            SendClientMessage(playerid,COLOR_ADMIN,"Has Respawneado todos los vehiculos sin uso");
            format(string,sizeof(string),"* AdminCmd: Todos los vehiculos sin uso han sido respawneados por: %s",sendername);
            SendClientMessageToAll(COLOR_ADMIN,string);
            GameTextForPlayer(playerid,"~g~Hecho",4000,6);
            new bool:unwanted[2000];
           
            for(new player=0; player<MAX_PLAYERS; player++)
            {
                if(IsPlayerInAnyVehicle(player))
                {
                    unwanted[GetPlayerVehicleID(player)]=true;
                }
            }

            for(new car = 3; car <= 639; car++)
            {
                if(!unwanted[car])
                {
                    SetVehicleToRespawn(car);
                }      
            }

            for(new car = 640; car <= 2000; car++)
            {
                if(!unwanted[car])
                {
                    DestroyVehicle(car);
                }  
            }
        }
        return 1;
    }
Y no, no es por el "return 1;", yo sospecho que son los loops...
Reply


Messages In This Thread
[AYUDA]Con Comando De Respawn - by camiloasc1 - 29.12.2009, 17:07
Re: [AYUDA]Con Comando De Respawn - by Javi_Cogollero - 29.12.2009, 22:57
Re: [AYUDA]Con Comando De Respawn - by camiloasc1 - 30.12.2009, 14:46
Re: [AYUDA]Con Comando De Respawn - by Miguel - 30.12.2009, 14:53
Re: [AYUDA]Con Comando De Respawn - by CEUanton - 30.12.2009, 16:10
Re: [AYUDA]Con Comando De Respawn - by CristianTdj - 30.12.2009, 17:07
Re: [AYUDA]Con Comando De Respawn - by camiloasc1 - 30.12.2009, 17:12
Re: [AYUDA]Con Comando De Respawn - by CEUanton - 30.12.2009, 17:16
Re: [AYUDA]Con Comando De Respawn - by camiloasc1 - 30.12.2009, 20:04

Forum Jump:


Users browsing this thread: 1 Guest(s)