Help with SetVehicleVelocity with OnPlayerKeyStateChange.
#2

You're missing one of the core includes.

Try to add these:

pawn Код:
#include <a_samp>
#include <core>
#include <float>
#include <time>
#include <file>
#include <utils>
#include <morphinc>

Also Sounds like you are messing up your indentations.

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
   if (PRESSED(KEY_FIRE))
   {
     new vehicleid = GetPlayerVehicleID(playerid);
     if (vehicleid)
     {
       SetVehicleVelocity(playerid, 0.0, 0,5, 0.0);
     }
   }
   return 1;
}
return 0;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)