ok werds mal gucken, habs jetz so:
blablabla Onplayerentervehicle
{
SetTimerEx("carcrash",500,1,"bla",true);
}
public carcrash(playerid)
{
if(IsPlayerInAnyVehicle(playerid))
{
new Float:Velocity[3];
GetVehicleVelocity(GetPlayerVehicleID(playerid), Velocity[0], Velocity[1], Velocity[2]);
new Float:geschwindigkeit = floatsqroot(Velocity[0]*Velocity[0] + Velocity[1]*Velocity[1] + Velocity[2]*Velocity[2]) * 100;
new Float:Velocity1[3];
GetVehicleVelocity(GetPlayerVehicleID(playerid), Velocity1[0], Velocity1[1], Velocity1[2]);
new Float:geschwindigkeit1 = floatsqroot(Velocity1[0]*Velocity1[0] + Velocity1[1]*Velocity1[1] + Velocity1[2]*Velocity1[2]) * 100;
if(geschwindigkeit > 100 && geschwindigkeit1 < 5)
{
SetPlayerDrunkLevel(playerid,50000);
SetTimerEx("nodrunkcrash",5000,0,"bla",true);
}
}
}
public nodrunkcrash(playerid)
{
if(IsPlayerInAnyVehicle(playerid))
{
SetPlayerDrunkLevel(playerid,0);
}
}
so richtisch?
und ich warte, und ich warte, und ich warte, und ich warte, und ich warte...