i got a problem with LOOPING
#5

About the car:
I removed that } else at the beginning, that could be one of the problem(s).
Also, please answer the questions in this script:
pawn Код:
if(PRESSED(KEY_ANALOG_DOWN))
    {
        if(!IsPlayerAdmin(playerid)) return 0; // This 'function' will not work if a player is not a RCON admin
            if(ATTACK == 1) // Are you sure the variable is 1 for the server?
            {
                GetVehiclePos(OMGCAR[0], CX, CY, CZ); // Where did you define XC, CY, CZ?
                GetVehicleZAngle(OMGCAR[0], CA); // Where did you define CA?
                GetVehicleVelocity(OMGCAR[0], VX, VY, VZ); // Where did you define VX,VY,VZ
                foreach(Player, i) // Where are you using this whole function? Why not at OnPlayerUpdate, so you don't have to use loops.
                {
                    if(IsPlayerInVehicle(i, OMGCAR[0])) // Isn't it a bit too late to check if the player is in a vehicle if the information of this vehicle is stored above?
                    {
                        new seat = GetPlayerVehicleSeat(i);
                        DestroyVehicle(OMGCAR[0]);
                        OMGCAR[0] = CreateVehicle(522, CX, CY, CZ, CA, 0, 1, 0);
                        PutPlayerInVehicle(i, OMGCAR[0], seat);
                        SetVehicleVelocity(OMGCAR[0], VX, VY, VZ);
                    }
                }
            }
    }
Reply


Messages In This Thread
i got a problem with LOOPING - by AH.1990 - 19.03.2011, 20:41
Re: i got a problem with LOOPING - by randomkid88 - 19.03.2011, 20:55
Re: i got a problem with LOOPING - by Biesmen - 19.03.2011, 21:03
Re: i got a problem with LOOPING - by AH.1990 - 19.03.2011, 21:11
Re: i got a problem with LOOPING - by Biesmen - 19.03.2011, 21:23
Re: i got a problem with LOOPING - by AH.1990 - 19.03.2011, 21:56

Forum Jump:


Users browsing this thread: 1 Guest(s)