how to make a command to add any vehicle?
#10

Try this:
pawn Код:
COMMAND:car( playerid, params[ ] )
{
   if( strval( params ) < 400 || strval( params ) > 611 )
      return SendClientMessage( playerid, 0xFF0000FF, "Invalid model ID." );

   new Float: x, Float: y, Float: z, Float: a;
   GetPlayerPos( playerid, x, y, z );
   GetPlayerFacingAngle( playerid, a );
   CreateVehicle( strval( params ), ( x += ( 5 * floatsin( -a, degrees ) ) ), ( y += ( 5 * floatcos( -a, degrees ) ) ), z, ( a - 90 ), -1, -1, 100000 );
   return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)