Vehicle Velocity
#4

Hi! Today I was messing with my code again and I found one strange 'bug':

I add this code:
pawn Код:
//code to spawn vehicle blah blah...
        KillTimer(Player[playerid][pTimer_UpdateVehicle]);
        Player[playerid][pTimer_UpdateVehicle] = SetTimerEx("UpdateSpawnedVehicle",1000,0,"dfff",playerid,xVel,yVel,zVel);
    }

    return 1;
}

forward UpdateSpawnedVehicle(playerid,xVel,yVel,zVel);
public UpdateSpawnedVehicle(playerid,xVel,yVel,zVel)
{
    PutPlayerInVehicle(playerid,Player[playerid][pVehicle],0);
    SetVehicleVelocity(Player[playerid][pVehicle],xVel,yVel,zVel);
    return 1;
}
The strange bug is that when I spawn the vehicle, the screen goes white and it shows Loading... at center of the screen (I've seen this before), but when I spawn the vehicle several times, the screen goes normal and then when I press LMB, it shows me in center of the screen BOMB ARMED (note: I dont have this code in my script). Why is my code messing with singleplayer functions now? I really need help, please.

EDIT: Nevermind, I forgot to add float mark in parameters.
Reply


Messages In This Thread
Vehicle Velocity - by Killer#Mummy - 04.08.2012, 21:49
Re: Vehicle Velocity - by Kar - 04.08.2012, 22:13
Re: Vehicle Velocity - by Killer#Mummy - 04.08.2012, 22:35
Re: Vehicle Velocity - by Killer#Mummy - 05.08.2012, 08:15

Forum Jump:


Users browsing this thread: 1 Guest(s)